Class: Oa2c::AuthorizationCode

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document, OAuth2Token
Defined in:
app/models/oa2c/authorization_code.rb

Instance Method Summary collapse

Methods included from OAuth2Token

#expire!, #expires_in

Instance Method Details

#access_tokenObject



8
9
10
# File 'app/models/oa2c/authorization_code.rb', line 8

def access_token
  @access_token ||= expire! && user.access_tokens.create(client: client)
end