X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/15b104f4ff4614aa78c01180b6a9b89dd5a1400f..90f1c492271ba8a777988a4b41a53c095af9ae99:/app/models/request_token.rb diff --git a/app/models/request_token.rb b/app/models/request_token.rb index 335a735bc..adeabb184 100644 --- a/app/models/request_token.rb +++ b/app/models/request_token.rb @@ -40,8 +40,9 @@ class RequestToken < OauthToken def authorize!(user) return false if authorized? + self.user = user - self.authorized_at = Time.now + self.authorized_at = Time.now.utc self.verifier = OAuth::Helper.generate_key(20)[0, 20] unless oauth10? save end @@ -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