Class: Restfulness::Requests::AuthorizationHeader
- Inherits:
-
Object
- Object
- Restfulness::Requests::AuthorizationHeader
- Defined in:
- lib/restfulness/requests/authorization_header.rb
Overview
Handle the HTTP Authorization header payload to automatically extract the scheme and parameters.
Instance Attribute Summary collapse
-
#params ⇒ Object
Returns the value of attribute params.
-
#schema ⇒ Object
Returns the value of attribute schema.
Instance Method Summary collapse
-
#initialize(payload) ⇒ AuthorizationHeader
constructor
A new instance of AuthorizationHeader.
Constructor Details
#initialize(payload) ⇒ AuthorizationHeader
Returns a new instance of AuthorizationHeader.
10 11 12 |
# File 'lib/restfulness/requests/authorization_header.rb', line 10 def initialize(payload) (self.schema, self.params) = payload.strip.split(' ', 2) end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params
8 9 10 |
# File 'lib/restfulness/requests/authorization_header.rb', line 8 def params @params end |
#schema ⇒ Object
Returns the value of attribute schema
8 9 10 |
# File 'lib/restfulness/requests/authorization_header.rb', line 8 def schema @schema end |