Sha256: bff255d193c81cf6c7ce9b5f2ad13c2368a344ddfed381e4fc61c85b29de23ad

Contents?: true

Size: 305 Bytes

Versions: 3

Compression:

Stored size: 305 Bytes

Contents

require 'expirable_token'

class Devise::Oauth2Providable::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

3 entries across 3 versions & 1 rubygems

Version Path
devise_oauth2_providable-1.0.1 app/models/devise/oauth2_providable/authorization_code.rb
devise_oauth2_providable-1.0.0 app/models/devise/oauth2_providable/authorization_code.rb
devise_oauth2_providable-1.0.0.beta1 app/models/devise/oauth2_providable/authorization_code.rb