Class UserTokenService

java.lang.Object
com.axelor.auth.UserTokenService

public class UserTokenService extends Object
Service for managing API tokens for user authentication.

This service provides functionality to generate, rotate, and revoke API keys that are used for authenticating users via the API key authentication mechanism.

Key features of this service:

  • Generates cryptographically secure random strings for keys and tokens
  • Ensures uniqueness of generated keys and tokens
  • Manages the lifecycle of user tokens (creation, rotation, revocation)

The service uses SecureRandom for generating random strings and AuthService for encrypting tokens before storage.