Class: OIDCProvider::ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/oidc_provider/application_controller.rb

Instance Method Summary collapse

Instance Method Details

#current_tokenObject



7
8
9
# File 'app/controllers/oidc_provider/application_controller.rb', line 7

def current_token
  @current_token ||= request.env[Rack::OAuth2::Server::Resource::ACCESS_TOKEN]
end

#oidc_current_accountObject



3
4
5
# File 'app/controllers/oidc_provider/application_controller.rb', line 3

def 
  send(OIDCProvider.)
end

#require_access_tokenObject



15
16
17
18
19
# File 'app/controllers/oidc_provider/application_controller.rb', line 15

def require_access_token
  unless current_token
    raise Rack::OAuth2::Server::Resource::Bearer::Unauthorized.new
  end
end

#require_authenticationObject



11
12
13
# File 'app/controllers/oidc_provider/application_controller.rb', line 11

def require_authentication
  send(OIDCProvider.current_authentication_method)
end

#unauthenticate!Object



21
22
23
# File 'app/controllers/oidc_provider/application_controller.rb', line 21

def unauthenticate!
  send(OIDCProvider.current_unauthenticate_method)
end