Add user transient attribute to oauth_access_token factory
This commit is contained in:
parent
3f62d67684
commit
ef648a53ba
6 changed files with 18 additions and 14 deletions
|
@ -138,7 +138,7 @@ module ActiveSupport
|
|||
def bearer_authorization_header(token_or_user = nil, scopes: Oauth::SCOPES)
|
||||
token = case token_or_user
|
||||
when nil then create(:oauth_access_token, :scopes => scopes).token
|
||||
when User then create(:oauth_access_token, :resource_owner_id => token_or_user.id, :scopes => scopes).token
|
||||
when User then create(:oauth_access_token, :user => token_or_user, :scopes => scopes).token
|
||||
when Doorkeeper::AccessToken then token_or_user.token
|
||||
when String then token_or_user
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue