class MsRest::StringTokenProvider
Class that provides access to authentication token.
Attributes
token[RW]
@return [String] the access token.
token_type[RW]
@return [String] the token type.
Public Class Methods
new(token, token_type = TokenCredentials::DEFAULT_SCHEME)
click to toggle source
@param token [String] the access token. @param token_type
[String] the token type.
# 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
Public Instance Methods
get_authentication_header()
click to toggle source
Returns the string value which needs to be attached to HTTP request header in order to be authorized.
@return [String] authentication headers.
# File lib/ms_rest/credentials/string_token_provider.rb, line 37 def get_authentication_header "#{token_type} #{token}" end