POST /api/Auth is a signed token that carries all identity and permission data the API needs to authorize requests. You never need to look inside the token during normal operation — but understanding its structure helps when debugging access issues.
Sending the token
Include the token in theAuthorization header on every request to a protected endpoint:
Token properties
| Property | Value |
|---|---|
| Algorithm | HMAC-SHA256 (HS256) |
| Lifetime | 30 minutes from issue time |
| Mechanism | Stateless — no server-side session |
| Refresh | Not supported — re-authenticate when expired |
Claims reference
The token payload contains the following claims:| Claim type | Key in token | Type | Description |
|---|---|---|---|
ClaimTypes.NameIdentifier | sub (or nameid) | string | The user’s unique ID in the identity store |
ClaimTypes.Name | unique_name | string | The user’s username |
perfilId | perfilId | string (integer) | The numeric ID of the profile assigned to the user |
esAdmin | esAdmin | string | "true" if the profile has administrator flag set, otherwise "false" |
permiso | permiso | string (repeated) | One claim per granted permission, e.g. "usuario.agregar". Multiple permiso claims may be present. |
esAdmin and perfilId are custom claims added by AuthService. Standard ASP.NET Core Identity claims use the full ClaimTypes.* URIs internally but may appear with short names when decoded at jwt.io.The permiso claim
Permissions are embedded as repeated claims — one permiso entry per granted action. A user with access to two modules may have a token that contains:
BitAdministrador = true, the token will contain one permiso claim for every action on every module registered in the system. See Permissions for the full list.
Decoded token example
A decoded JWT payload for a non-admin user might look like this:How to decode the token
Using jwt.io
Paste the raw token string into jwt.io. The site decodes the header and payload without verifying the signature. Use this for quick inspection during development.Using C# (JwtSecurityTokenHandler)
Related pages
Authentication overview
The full login flow from credentials to protected request.
Permissions
How the
permiso claims map to specific API endpoints.