Log in
Model

CustomerTokenService

Magento\Integration\Model\CustomerTokenService

What it does

This service manages customer authentication tokens for Magento 2's REST API.

Developers use this class to generate OAuth access tokens when customers log in via API endpoints, and to revoke tokens when customers log out or when token invalidation is needed.

It handles authentication, throttling failed login attempts, and dispatching customer login events.

Public Methods

  • createCustomerAccessToken()
  • revokeCustomerAccessToken()