Class: Masks::Rails::OpenID::Authorization
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Masks::Rails::OpenID::Authorization
- Defined in:
- app/models/masks/rails/openid/authorization.rb
Instance Method Summary collapse
Instance Method Details
#access_token ⇒ Object
27 28 29 30 |
# File 'app/models/masks/rails/openid/authorization.rb', line 27 def access_token @access_token ||= update_attribute!(:expires_at, Time.now) && generate_access_token! end |
#generate_access_token! ⇒ Object
32 33 34 |
# File 'app/models/masks/rails/openid/authorization.rb', line 32 def generate_access_token! actor.openid_access_tokens.create!(openid_client:, scopes:) end |
#valid_redirect_uri?(uri) ⇒ Boolean
23 24 25 |
# File 'app/models/masks/rails/openid/authorization.rb', line 23 def valid_redirect_uri?(uri) uri == redirect_uri end |