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 logger.info("£££ In exchange!")
13 params = { :user => user, :client_application => client_application }
14 # copy the permissions from the authorised request token to the access token
15 client_application.permissions.each { |p|
16 logger.info("£££ copying permission #{p} = #{read_attribute(p).inspect}")
17 params[p] = read_attribute(p)
20 access_token = AccessToken.create(params)