module Doorkeeper::AccessTokenMixin::ClassMethods

def custom_attributes_match?(token, custom_attributes)

Returns:
  • (Boolean) - true if the token's custom attribute values

Parameters:
  • custom_attributes (Hash) --
  • token (Doorkeeper::AccessToken) --
def custom_attributes_match?(token, custom_attributes)
  return true if custom_attributes.nil?
  token_attribs = token.custom_attributes
  return true if token_attribs.blank? && custom_attributes.blank?
  Doorkeeper.config.custom_access_token_attributes.all? do |attribute|
    token_attribs[attribute] == custom_attributes[attribute]
  end
end