Module: OIDCProvider::Concerns::Authentication

Included in:
ApplicationController
Defined in:
app/controllers/oidc_provider/concerns/authentication.rb

Instance Method Summary collapse

Instance Method Details

#current_accountObject



4
5
6
# File 'app/controllers/oidc_provider/concerns/authentication.rb', line 4

def 
  send(OIDCProvider.)
end

#current_tokenObject



8
9
10
# File 'app/controllers/oidc_provider/concerns/authentication.rb', line 8

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

#require_access_tokenObject



16
17
18
19
20
# File 'app/controllers/oidc_provider/concerns/authentication.rb', line 16

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

#require_authenticationObject



12
13
14
# File 'app/controllers/oidc_provider/concerns/authentication.rb', line 12

def require_authentication
  authenticate_user!
end