class Rack::OAuth2::Server::Token::Request

Public Class Methods

new(env) click to toggle source
# File lib/rack/oauth2/server/token.rb, line 45
def initialize(env)
  auth = Rack::Auth::Basic::Request.new(env)
  if auth.provided? && auth.basic?
    @client_id, @client_secret = auth.credentials
    super
  else
    super
    @client_secret = params['client_secret']
  end
  @grant_type = params['grant_type'].to_s
end