Class: HaveAPI::Authentication::Base
- Inherits:
-
Object
- Object
- HaveAPI::Authentication::Base
- Defined in:
- lib/haveapi/authentication/base.rb
Overview
Base class for authentication providers.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#resources ⇒ Object
Returns the value of attribute resources.
Instance Method Summary collapse
-
#authenticate(request) ⇒ Object
Reimplement this method in your authentication provider.
-
#describe ⇒ Object
Reimplement to describe provider.
-
#initialize(server, v) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(server, v) ⇒ Base
Returns a new instance of Base.
7 8 9 10 11 |
# File 'lib/haveapi/authentication/base.rb', line 7 def initialize(server, v) @server = server @version = v setup end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/haveapi/authentication/base.rb', line 5 def name @name end |
#resources ⇒ Object
Returns the value of attribute resources.
5 6 7 |
# File 'lib/haveapi/authentication/base.rb', line 5 def resources @resources end |
Instance Method Details
#authenticate(request) ⇒ Object
Reimplement this method in your authentication provider. request is passed directly from Sinatra.
15 16 17 |
# File 'lib/haveapi/authentication/base.rb', line 15 def authenticate(request) end |
#describe ⇒ Object
Reimplement to describe provider.
20 21 22 |
# File 'lib/haveapi/authentication/base.rb', line 20 def describe {} end |