lib/doorkeeper-mongodb/mixins/mongoid/access_token_mixin.rb
# Returns an instance of the Doorkeeper::AccessToken with
# specific token value.
#
# @param token [#to_s]
#   token value (any object that responds to `#to_s`)
#
# @return [Doorkeeper::AccessToken, nil] AccessToken object or nil
#   if there is no record with such token
#
Returns an instance of the Doorkeeper::AccessToken with
specific token value.
Returns an instance of the Doorkeeper :: AccessToken with specific token value .
def find_matching_token(relation, application, scopes)
            relation.detect do |token|
              scopes_match?(token.scopes, scopes, application.try(:scopes))
            end
          end
def find_matching_token ( relation , application , scopes ) relation . detect do | token | scopes_match? ( token . scopes , scopes , application . try ( :scopes ) ) end end
Returns an instance of the Doorkeeper::AccessToken with
specific token value.
Returns an instance of the Doorkeeper :: AccessToken with specific token value .
AccessToken object or nil if there is no record with such token
AccessToken object or nil if there is no record with such token
Doorkeeper::AccessToken, nil
relation
<not_specific>
application
<not_specific>
scopes
<not_specific>
token
<not_specific>
token value (any object that responds to `#to_s`)
token value ( any object that responds to ` #to_s ` )