---
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 markdown="1">

[(constructor)(jwtSecret, jwtExpiresIn)](./authentication-jwt.jwtservice._constructor_.md)


</td><td markdown="1">


</td><td markdown="1">

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 markdown="1">

[generateToken(userProfile)](./authentication-jwt.jwtservice.generatetoken.md)


</td><td markdown="1">


</td><td markdown="1">


</td></tr>
<tr><td markdown="1">

[verifyToken(token)](./authentication-jwt.jwtservice.verifytoken.md)


</td><td markdown="1">


</td><td markdown="1">


</td></tr>
</tbody></table>


