Class: OIDCProvider::ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- OIDCProvider::ApplicationController
show all
- Defined in:
- app/controllers/oidc_provider/application_controller.rb
Instance Method Summary
collapse
Instance Method Details
#current_token ⇒ Object
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_account ⇒ Object
3
4
5
|
# File 'app/controllers/oidc_provider/application_controller.rb', line 3
def oidc_current_account
send(OIDCProvider.current_account_method)
end
|
#require_access_token ⇒ Object
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_authentication ⇒ Object
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
|