Class: Rack::Auth::Travis::DIYAuthenticator
- Inherits:
-
Object
- Object
- Rack::Auth::Travis::DIYAuthenticator
- Defined in:
- lib/rack/auth/travis.rb
Instance Method Summary collapse
-
#initialize(authenticator_block) ⇒ DIYAuthenticator
constructor
A new instance of DIYAuthenticator.
- #valid?(auth_req) ⇒ Boolean
Constructor Details
#initialize(authenticator_block) ⇒ DIYAuthenticator
Returns a new instance of DIYAuthenticator.
66 67 68 |
# File 'lib/rack/auth/travis.rb', line 66 def initialize(authenticator_block) @authenticator_block = authenticator_block end |
Instance Method Details
#valid?(auth_req) ⇒ Boolean
70 71 72 |
# File 'lib/rack/auth/travis.rb', line 70 def valid?(auth_req) @authenticator_block.call(auth_req.repo_slug, auth_req.token) end |