UNPKG

@loopback/docs

Version:

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

67 lines (35 loc) 1.27 kB
--- lang: en title: 'API docs: authentication.tokenservice.verifytoken' 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.verifytoken.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) &gt; [verifyToken](./authentication.tokenservice.verifytoken.md) ## TokenService.verifyToken() method Verifies the validity of a token string and returns a user profile **Signature:** ```typescript verifyToken(token: string): Promise<UserProfile>; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td markdown="1"> token </td><td markdown="1"> string </td><td markdown="1"> The token/secret which should be validated/verified. </td></tr> </tbody></table> **Returns:** Promise&lt;[UserProfile](./security.userprofile.md)<!-- -->&gt; The UserProfile which belongs to the given token.