#}

JWT Authentication

Secure your API with JWT tokens and role-based access control

Authentication Features

Overview

GEMVC provides a comprehensive authentication system with JWT support, role-based access control (RBAC), and secure session management, all integrated into the Request class.

JWT Tokens Stateless authentication
RBAC Role-based access control
Request Integration Built into Request class
Token Refresh Automatic token renewal
info: JWT tokens are validated automatically when you use the authentication methods in your controllers.

Key Features

  • JWT Token Generation - Create secure tokens with custom claims
  • Role-Based Access - Control access based on user roles
  • Token Expiration - Automatic token expiry handling
  • Token Refresh - Seamless token renewal without re-login
Tip: Always store JWT secret keys in environment variables, never hardcode them in your source code!

Next Steps