Log in
Model

Token

Magento\Integration\Model\ResourceModel\Oauth\Token

What it does

This resource model manages OAuth tokens in the database, including creating, retrieving, and deleting tokens for API authentication.

Developers use this class when working with OAuth token lifecycle management, such as cleaning up expired tokens, retrieving tokens for specific users (admin/customer), or implementing custom OAuth authentication flows in Magento 2.

Public Methods

  • cleanOldAuthorizedTokensExcept()
  • deleteOldEntries()
  • deleteExpiredTokens()
  • selectTokenByType()
  • selectTokenByConsumerIdAndUserType()
  • selectTokenByAdminId()
  • selectTokenByCustomerId()