Page Contents

Home > @loopback/authentication > TokenService

TokenService interface

An interface for generating and verifying a token

Signature:

export interface TokenService 

Methods

Method Description
generateToken(userProfile) Generates a token string based on a user profile
revokeToken(token)? (Optional) Revokes a given token (if supported by token system)
verifyToken(token) Verifies the validity of a token string and returns a user profile