Method: ActionController::HttpAuthentication::Token#encode_credentials
- Defined in:
- lib/action_controller/metal/http_authentication.rb
#encode_credentials(token, options = {}) ⇒ Object
Encodes the given token and options into an Authorization header value.
token - String token. options - optional Hash of the options.
Returns String.
483 484 485 486 487 488 |
# File 'lib/action_controller/metal/http_authentication.rb', line 483 def encode_credentials(token, = {}) values = ["token=#{token.to_s.inspect}"] + .map do |key, value| "#{key}=#{value.to_s.inspect}" end "Token #{values * ", "}" end |