UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

33 lines (22 loc) 1.16 kB
--- lang: en title: 'API docs: authentication.tokenservice' keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI sidebar: lb4_sidebar editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/authentication permalink: /doc/en/lb4/apidocs.authentication.tokenservice.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/authentication](./authentication.md) &gt; [TokenService](./authentication.tokenservice.md) ## TokenService interface An interface for generating and verifying a token <b>Signature:</b> ```typescript export interface TokenService ``` ## Methods | Method | Description | | --- | --- | | [generateToken(userProfile)](./authentication.tokenservice.generatetoken.md) | Generates a token string based on a user profile | | [revokeToken(token)?](./authentication.tokenservice.revoketoken.md) | <i>(Optional)</i> Revokes a given token (if supported by token system) | | [verifyToken(token)](./authentication.tokenservice.verifytoken.md) | Verifies the validity of a token string and returns a user profile |