1 class RequestToken < OauthToken
3 return false if authorized?
5 self.authorized_at = Time.now
10 return false unless authorized?
11 RequestToken.transaction do
12 params = { :user => user, :client_application => client_application }
13 # copy the permissions from the authorised request token to the access token
14 client_application.permissions.each { |p|
15 params[p] = read_attribute(p)
18 access_token = AccessToken.create(params)