Class: Gruf::Authentication::Base
- Inherits:
-
Object
- Object
- Gruf::Authentication::Base
- Includes:
- Loggable
- Defined in:
- lib/gruf/authentication/base.rb
Overview
Base interface for Authentication strategies
Instance Attribute Summary collapse
-
#credentials ⇒ Object
readonly
Returns the value of attribute credentials.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
-
.verify(call, credentials = '', options = {}) ⇒ Object
Verify the credentials.
Instance Method Summary collapse
-
#initialize(credentials, options = {}) ⇒ Base
constructor
A new instance of Base.
- #valid?(_call) ⇒ Boolean
Methods included from Loggable
Constructor Details
Instance Attribute Details
#credentials ⇒ Object (readonly)
Returns the value of attribute credentials.
25 26 27 |
# File 'lib/gruf/authentication/base.rb', line 25 def credentials @credentials end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
25 26 27 |
# File 'lib/gruf/authentication/base.rb', line 25 def @options end |
Class Method Details
.verify(call, credentials = '', options = {}) ⇒ Object
Verify the credentials. Helper class method.
44 45 46 |
# File 'lib/gruf/authentication/base.rb', line 44 def self.verify(call, credentials = '', = {}) new(credentials, ).valid?(call) end |
Instance Method Details
#valid?(_call) ⇒ Boolean
52 53 54 |
# File 'lib/gruf/authentication/base.rb', line 52 def valid?(_call) raise NotImplementedError end |