Class: School21::AuthorizationHeader
- Inherits:
-
CoreLibrary::HeaderAuth
- Object
- CoreLibrary::HeaderAuth
- School21::AuthorizationHeader
- Defined in:
- lib/school21/auth/authorization_header.rb
Instance Method Summary collapse
- #error_message ⇒ Object
-
#initialize(bearer_auth_credentials) ⇒ AuthorizationHeader
constructor
A new instance of AuthorizationHeader.
Constructor Details
#initialize(bearer_auth_credentials) ⇒ AuthorizationHeader
Returns a new instance of AuthorizationHeader.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/school21/auth/authorization_header.rb', line 9 def initialize(bearer_auth_credentials) auth_params = {} @access_token = bearer_auth_credentials.access_token unless bearer_auth_credentials.nil? || bearer_auth_credentials.access_token.nil? auth_params['Authorization'] = "Bearer #{@access_token}" unless @access_token.nil? super(auth_params) end |
Instance Method Details
#error_message ⇒ Object
5 6 7 |
# File 'lib/school21/auth/authorization_header.rb', line 5 def 'BearerAuth: access_token is undefined.' end |