Class: SSO::Client::Authentications::Passport
- Inherits:
-
Object
- Object
- SSO::Client::Authentications::Passport
- Includes:
- Benchmarking, Logging
- Defined in:
- lib/sso/client/authentications/passport.rb
Overview
Logic to authenticate a Passport provided by an outsider app to an insider app.
Instance Method Summary collapse
- #authenticate ⇒ Object
-
#initialize(request) ⇒ Passport
constructor
A new instance of Passport.
Methods included from Benchmarking
Methods included from Meter
#caller_name, #metric, #timing, #track
Methods included from Logging
#debug, #error, #fatal, #info, #logger, #progname, #warn
Constructor Details
#initialize(request) ⇒ Passport
Returns a new instance of Passport.
11 12 13 |
# File 'lib/sso/client/authentications/passport.rb', line 11 def initialize(request) @request = request end |
Instance Method Details
#authenticate ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/sso/client/authentications/passport.rb', line 15 def authenticate debug { 'Performing authentication...' } result = authenticate! if result.success? debug { 'Authentication succeeded.' } return result end debug { "The Client Passport authentication failed: #{result.code}" } Operations.failure :passport_authentication_failed, object: failure_rack_array end |