Class: School21::AuthorizationHeader

Inherits:
CoreLibrary::HeaderAuth
  • Object
show all
Defined in:
lib/school21/auth/authorization_header.rb

Instance Method Summary collapse

Constructor Details

#initialize(bearer_auth_credentials) ⇒ AuthorizationHeader

Returns a new instance of AuthorizationHeader.



9
10
11
12
13
14
15
# File 'lib/school21/auth/authorization_header.rb', line 9

def initialize(bearer_auth_credentials)
  access_token = bearer_auth_credentials.access_token
  auth_params = {}
  auth_params['Authorization'] = "Bearer #{access_token}"

  super(auth_params)
end

Instance Method Details

#error_messageObject



5
6
7
# File 'lib/school21/auth/authorization_header.rb', line 5

def error_message
  'BearerAuth: access_token is undefined.'
end