X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/b26adef905a900bb8d171e4fcb37098e4d7718b2..0a52a4eb0776874607a321c05c65c656abb85b7e:/app/models/user.rb?ds=sidebyside diff --git a/app/models/user.rb b/app/models/user.rb index ecf93b6f7..1db8adab7 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -203,4 +203,10 @@ class User < ActiveRecord::Base return score.to_i end + + ## + # return an oauth access token for a specified application + def access_token(application_key) + return ClientApplication.find_by_key(application_key).access_token_for_user(self) + end end