Module: VIISP::Auth
- Defined in:
- lib/viisp/auth.rb,
lib/viisp/auth/client.rb,
lib/viisp/auth/errors.rb,
lib/viisp/auth/signing.rb,
lib/viisp/auth/version.rb,
lib/viisp/auth/identity.rb,
lib/viisp/auth/configuration.rb,
lib/viisp/auth/requests/soap.rb,
lib/viisp/auth/requests/ticket.rb,
lib/viisp/auth/requests/identity.rb,
lib/viisp/auth/requests/signature.rb
Defined Under Namespace
Modules: Requests, Signing
Classes: Client, Configuration, ConfigurationError, Error, Identity, RequestError, SignatureError
Constant Summary
collapse
- VERSION =
'0.2.0'
Class Method Summary
collapse
Class Method Details
.client ⇒ Object
25
26
27
|
# File 'lib/viisp/auth.rb', line 25
def client
@client ||= Client.new
end
|
.configuration ⇒ Object
21
22
23
|
# File 'lib/viisp/auth.rb', line 21
def configuration
@configuration ||= Configuration.new
end
|
17
18
19
|
# File 'lib/viisp/auth.rb', line 17
def configure
yield(configuration)
end
|
.identity(options = {}) ⇒ Object
41
42
43
44
45
46
47
48
|
# 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 ⇒ Object
29
30
31
|
# File 'lib/viisp/auth.rb', line 29
def portal_endpoint
configuration.portal_endpoint
end
|
.ticket(options = {}) ⇒ Object
33
34
35
36
37
38
39
|
# 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
|