Class: Restfulness::Requests::AuthorizationHeader

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#paramsObject

Returns the value of attribute params.



8
9
10
# File 'lib/restfulness/requests/authorization_header.rb', line 8

def params
  @params
end

#schemaObject

Returns the value of attribute schema.



8
9
10
# File 'lib/restfulness/requests/authorization_header.rb', line 8

def schema
  @schema
end