---
lang: en
title: 'API docs: authentication-jwt.jwtservice'
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.jwtservice.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/authentication-jwt](./authentication-jwt.md) &gt; [JWTService](./authentication-jwt.jwtservice.md)

## JWTService class

**Signature:**

```typescript
export declare class JWTService implements TokenService 
```
**Implements:** [TokenService](./authentication.tokenservice.md)

## Constructors

<table><thead><tr><th>

Constructor


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[(constructor)(jwtSecret, jwtExpiresIn)](./authentication-jwt.jwtservice._constructor_.md)


</td><td>


</td><td>

Constructs a new instance of the `JWTService` class


</td></tr>
</tbody></table>

## Methods

<table><thead><tr><th>

Method


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[generateToken(userProfile)](./authentication-jwt.jwtservice.generatetoken.md)


</td><td>


</td><td>


</td></tr>
<tr><td>

[verifyToken(token)](./authentication-jwt.jwtservice.verifytoken.md)


</td><td>


</td><td>


</td></tr>
</tbody></table>


