encode_credentials(token, options = {})
public
Encodes the given token and options into an Authorization header value.
token - String token. options - optional Hash of the options.
Returns String.
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 444
def encode_credentials(token, options = {})
values = ["token=#{token.to_s.inspect}"] + options.map do |key, value|
"#{key}=#{value.to_s.inspect}"
end
"Token #{values * ", "}"
end