module VIISP::Auth

Constants

VERSION

Public Instance Methods

client() click to toggle source
# File lib/viisp/auth.rb, line 25
def client
  @client ||= Client.new
end
configuration() click to toggle source
# File lib/viisp/auth.rb, line 21
def configuration
  @configuration ||= Configuration.new
end
configure() { |configuration| ... } click to toggle source
# File lib/viisp/auth.rb, line 17
def configure
  yield(configuration)
end
identity(options = {}) click to toggle source
# File lib/viisp/auth.rb, line 41
def identity(options = {})
  request = Requests::Identity.new(**options).build

  doc = client.post(request)
  doc.remove_namespaces!

  Identity.new(doc).to_hash
end
portal_endpoint() click to toggle source
# File lib/viisp/auth.rb, line 29
def portal_endpoint
  configuration.portal_endpoint
end
ticket(options = {}) click to toggle source
# File lib/viisp/auth.rb, line 33
def ticket(options = {})
  request = Requests::Ticket.new(**options).build

  doc = client.post(request)
  doc.remove_namespaces!
  doc.at('ticket')&.text
end