UNPKG

@loopback/docs

Version:

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

32 lines (21 loc) 1.29 kB
--- lang: en title: 'API docs: authentication-jwt.refreshtokenservice' keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI sidebar: lb4_sidebar editurl: https://github.com/loopbackio/loopback-next/tree/master/extensions/authentication-jwt permalink: /doc/en/lb4/apidocs.authentication-jwt.refreshtokenservice.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/authentication-jwt](./authentication-jwt.md) &gt; [RefreshTokenService](./authentication-jwt.refreshtokenservice.md) ## RefreshTokenService interface The token refresh service. An access token expires in limited time. Therefore token refresh service is needed to keep replacing the old access token with a new one periodically. <b>Signature:</b> ```typescript export interface RefreshTokenService ``` ## Methods | Method | Description | | --- | --- | | [generateToken(userProfile, token)](./authentication-jwt.refreshtokenservice.generatetoken.md) | Generate a refresh token, bind it with the given user profile + access token, then store them in backend. | | [refreshToken(refreshToken)](./authentication-jwt.refreshtokenservice.refreshtoken.md) | Refresh the access token bound with the given refresh token. |