@selfcommunity/api-services
Version:
Client api for SelfCommunity.
21 lines (20 loc) • 544 B
TypeScript
/**
* Generate a JWT
:::tip Context can be consumed as following:
```jsx
1. const token = await generateJWTToken(userId, secretKey, expirationTime);
```
```jsx
2. generateJWTToken(userId, secretKey, expirationTime).then(token => {...});
```
:::
* @param userId
* @param secretKey
* @param expirationTime
*/
export declare function generateJWTToken(userId: any, secretKey: any, expirationTime?: string): Promise<string>;
/**
* Extract from a jwt token payload
* @param token
*/
export declare function parseJwt(token: any): any;