X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/aa1fb6dbb8c2e71b8ce8c231ae1272a2dfebd75a..2d47d6b4f8c4309189704c2748ea92eeeaff6c4d:/app/models/request_token.rb diff --git a/app/models/request_token.rb b/app/models/request_token.rb index 335a735bc..f7c9501b5 100644 --- a/app/models/request_token.rb +++ b/app/models/request_token.rb @@ -40,6 +40,7 @@ class RequestToken < OauthToken def authorize!(user) return false if authorized? + self.user = user self.authorized_at = Time.now self.verifier = OAuth::Helper.generate_key(20)[0, 20] unless oauth10? @@ -76,6 +77,6 @@ class RequestToken < OauthToken end def oauth10? - (defined? OAUTH_10_SUPPORT) && OAUTH_10_SUPPORT && callback_url.blank? + Settings.key?(:oauth_10_support) && Settings.oauth_10_support && callback_url.blank? end end