Static tokens
For local development and API testing you may need a static token, which will be permanent and simple.
You can define such tokens in packages/token-api/src/config/local.ts
under staticTokens
.
It's array of objects, each object is a pair of token and user.
Token is a string, user should be valid auth user.
Example:
staticTokens: [
{
token: 'TITAN_PORTAL_API_TOKEN', // predefined system static token for TP, required for mail sending from the titan portal
user: {
name: 'Titan Portal API',
email: null,
type: UserTypes.System,
id: 'TITAN_PORTAL_API',
roles: [],
permissions: [],
}
},
{
token: 'tp', // any token you want
user: {
name: 'Joe Doe',
type: UserTypes.Titan,
email: 'd.tolpekin@softarex.com',
id: 'person_StephenWerner_1538660075_pyhoq35c_0kwb_yu0m_8f4u_i72wewbis11i', // it's better to use real id
roles: [UserRoles.TpUser, UserRoles.TpRegisteredUser],
permissions: [],
}
},
],