Class: Rack::OAuth2::Server::Abstract::Handler

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/oauth2/server/abstract/handler.rb

Direct Known Subclasses

Rack::OAuth2::Server::Authorize, Rack::OAuth2::Server::Authorize::Code, Rack::OAuth2::Server::Authorize::Extension::CodeAndToken, Rack::OAuth2::Server::Authorize::Token, Resource, Token, Token::AuthorizationCode, Token::ClientCredentials, Token::Extension::JWT, Token::Password, Token::RefreshToken

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Handler) initialize(&authenticator)

Returns a new instance of Handler



8
9
10
# File 'lib/rack/oauth2/server/abstract/handler.rb', line 8

def initialize(&authenticator)
  @authenticator = authenticator
end

Instance Attribute Details

- (Object) authenticator

Returns the value of attribute authenticator



6
7
8
# File 'lib/rack/oauth2/server/abstract/handler.rb', line 6

def authenticator
  @authenticator
end

- (Object) request

Returns the value of attribute request



6
7
8
# File 'lib/rack/oauth2/server/abstract/handler.rb', line 6

def request
  @request
end

- (Object) response

Returns the value of attribute response



6
7
8
# File 'lib/rack/oauth2/server/abstract/handler.rb', line 6

def response
  @response
end

Instance Method Details

- (Object) call(env)



12
13
14
15
# File 'lib/rack/oauth2/server/abstract/handler.rb', line 12

def call(env)
  @authenticator.call(@request, @response) if @authenticator
  @response
end