Skip to main content
Module

x/getting_started_with_deno_jwt_auth/repository.ts>Repository

Package used for jwt-auth on the Getting Started With Deno book by PacktPub
Latest
class Repository
implements AuthRepository
import { Repository } from "https://deno.land/x/getting_started_with_deno_jwt_auth@v0.0.6/repository.ts";

Generates, gets and stores (in-memory) jwt tokens for a userId

Constructors

new
Repository(dependencies?: RepositoryDependencies)

Properties

private
configuration: Configuration
private
storage: Map<string, string>

Methods

generateToken(userId: string)

Generates and persists the token for the provided userId

getToken(userId: string)

Retrieves the stored token for the provided userId