Class: OIDCProvider::Authorization

Inherits:
ApplicationRecord show all
Defined in:
app/models/oidc_provider/authorization.rb

Instance Method Summary collapse

Instance Method Details

#access_tokenObject


19
20
21
# File 'app/models/oidc_provider/authorization.rb', line 19

def access_token
  super || expire! && generate_access_token!
end

#expire!Object


14
15
16
17
# File 'app/models/oidc_provider/authorization.rb', line 14

def expire!
  self.expires_at = Time.now
  self.save!
end

#id_tokenObject


23
24
25
# File 'app/models/oidc_provider/authorization.rb', line 23

def id_token
  super || generate_id_token!
end