require 'expirable_token'

class AuthorizationCode < ActiveRecord::Base
  include ExpirableToken

  validates :token, :uniqueness => true

  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

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

Revert "Added uniquness validation to authorization code's :token column"
Revert "Added uniquness validation to authorization code's :token column"

This reverts commit 3a61d79b58c031066078a2163d7407cbd586022e.

Conflicts:

	app/models/authorization_code.rb
