X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/cd66a5db99fda4920ed559ec71163d5d01ba1f4a..42ef10ba80bf7ff13b4f9210e5fbf54538e0d52f:/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