authentication_constants.py 603 B

1234567891011121314
  1. # Authentication error messages
  2. TOKEN_AUTH_ENABLED_BUT_NO_TOKEN_FOUND_ERROR_MESSAGE = (
  3. "Token authentication is enabled but no authentication token was found"
  4. )
  5. TOKEN_INVALID_ERROR_MESSAGE = "Token authentication is enabled but the authentication token is invalid or incorrect." # noqa: E501
  6. # HTTP header and cookie constants
  7. AUTHORIZATION_HEADER_NAME = "authorization"
  8. AUTHORIZATION_BEARER_PREFIX = "Bearer "
  9. RAY_AUTHORIZATION_HEADER_NAME = "x-ray-authorization"
  10. AUTHENTICATION_TOKEN_COOKIE_NAME = "ray-authentication-token"
  11. AUTHENTICATION_TOKEN_COOKIE_MAX_AGE = 30 * 24 * 60 * 60 # 30 days