class Doorkeeper::Server
def authorization_request(strategy)
def authorization_request(strategy) klass = Request.authorization_strategy strategy klass.build self end
def client
def client @client ||= OAuth::Client.authenticate(credentials) end
def client_via_uid
def client_via_uid @client_via_uid ||= OAuth::Client.find(parameters[:client_id]) end
def credentials
def credentials methods = Doorkeeper.configuration.client_credentials_methods @credentials ||= OAuth::Client::Credentials.from_request(context.request, *methods) end
def current_refresh_token
def current_refresh_token AccessToken.by_refresh_token(parameters[:refresh_token]) end
def current_resource_owner
def current_resource_owner context.send :current_resource_owner end
def grant
def grant AccessGrant.authenticate(parameters[:code]) end
def initialize(context = nil)
def initialize(context = nil) @context = context end
def parameters
def parameters context.request.parameters end
def resource_owner
def resource_owner context.send :resource_owner_from_credentials end
def token_request(strategy)
def token_request(strategy) klass = Request.token_strategy strategy klass.build self end