module ActionController::HttpAuthentication::Token

def encode_credentials(token, options = {})

* +options+ - Optional Hash of the options.
* +token+ - String token.

==== Parameters

Returns String.

Encodes the given token and options into an Authorization header value.
def encode_credentials(token, options = {})
  values = ["#{TOKEN_KEY}#{token.to_s.inspect}"] + options.map do |key, value|
    "#{key}=#{value.to_s.inspect}"
  end
  "Token #{values * ", "}"
end