Sha256: 93fdfd2ec72e2dcc01a3f8011c391d73365a3eabb4bf35b9ec52cca3b959190a

Contents?: true

Size: 280 Bytes

Versions: 7

Compression:

Stored size: 280 Bytes

Contents

require 'expirable_token'

class AuthorizationCode < ActiveRecord::Base
  include ExpirableToken

  def access_token
    @access_token ||= expired! && user.access_tokens.create(:client => client)
  end
  def valid_request?(req)
    self.redirect_uri == req.redirect_uri
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
devise_oauth2_providable-0.2.3 app/models/authorization_code.rb
devise_oauth2_providable-0.2.2 app/models/authorization_code.rb
devise_oauth2_providable-0.2.1 app/models/authorization_code.rb
devise_oauth2_providable-0.2.0 app/models/authorization_code.rb
devise_oauth2_providable-0.1.6 app/models/authorization_code.rb
devise_oauth2_providable-0.1.5 app/models/authorization_code.rb
devise_oauth2_providable-0.1.4 app/models/authorization_code.rb