Class: MsRest::StringTokenProvider
- Inherits:
-
TokenProvider
- Object
- TokenProvider
- MsRest::StringTokenProvider
- Defined in:
- lib/ms_rest/credentials/string_token_provider.rb
Overview
Class that provides access to authentication token.
Instance Method Summary collapse
-
#get_authentication_header ⇒ String
Returns the string value which needs to be attached to HTTP request header in order to be authorized.
-
#initialize(token, token_type = TokenCredentials::DEFAULT_SCHEME) ⇒ StringTokenProvider
constructor
A new instance of StringTokenProvider.
Constructor Details
#initialize(token, token_type = TokenCredentials::DEFAULT_SCHEME) ⇒ StringTokenProvider
Returns a new instance of StringTokenProvider.
27 28 29 30 |
# File 'lib/ms_rest/credentials/string_token_provider.rb', line 27 def initialize(token, token_type = TokenCredentials::DEFAULT_SCHEME) @token = token @token_type = token_type end |
Instance Method Details
#get_authentication_header ⇒ String
Returns the string value which needs to be attached to HTTP request header in order to be authorized.
37 38 39 |
# File 'lib/ms_rest/credentials/string_token_provider.rb', line 37 def get_authentication_header "#{token_type} #{token}" end |