Project Authentication issues short-lived RS256 access tokens and opaque rotating refresh tokens. Session policy is configured per project.
#Token model
| Token | Format | Use |
|---|---|---|
| Access token | RS256 JWT | Call user-protected application APIs |
| Refresh token | Opaque halo_auth_rt_… | Rotate the session |
| Provider login code | One-time opaque code | Complete social sign-in |
| OAuth App token | RS256 JWT + opaque refresh | Service-scoped access |
#Refresh rotation
curl -X POST \
"https://api.agihalo.com/api/v1/auth/token?grant_type=refresh_token" \
-H "apikey: $HALO_PROJECT_PUBLISHABLE_KEY" \
-H "Content-Type: application/json" \
-d '{
"refresh_token": "halo_auth_rt_..."
}'#Verify access tokens
GET
/api/v1/auth/.well-known/jwks.jsonFetch the project public JWK using the publishable-key header and cache it briefly. Validate all of the following:
- Algorithm is
RS256and the JWTkidmatches a JWK. - Issuer is
halo-project:{projectId}. - Audience is
halo-project-authfor project user tokens. tokenUseisproject_auth_access.- Expiry, project ID, subject, session ID, and email are present.
GET
/api/v1/auth/userResolve a valid bearer access token to the current user.
#Revocation
POST
/api/v1/auth/logoutProject owners can also list active sessions and revoke an individual session from the dashboard. User ban or deletion makes future session validation unavailable.