Method: OAuth2::AuthCode#initialize

Defined in:
lib/oauth20/auth_code.rb

#initialize(data) ⇒ AuthCode

Initialize new authorization code.

Parameters:



17
18
19
20
21
22
23
24
# File 'lib/oauth20/auth_code.rb', line 17

def initialize(data)
  @key          = data[:key]
  @created_at   = data[:created_at] || Time.now
  @expires_at   = data[:expires_at] || Time.now + EXPIRES_IN
  @access_token = data[:access_token]
  @user_id      = data[:user_id]
  @client_key   = data[:client_key]
end