Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@cuser/auth

rubeniskov23MIT0.0.36TypeScript support: included

auth core utility

readme

cuser logo

Status

codecov npm npm-downloads

Class: CuserAuth

Auth controller

Hierarchy

  • CuserAuth

Index

Constructors

Methods

Constructors

constructor

+ new CuserAuth(node: IPFSAPI | Promise<IPFSAPI>, secret: string, opts: CuserCryptoKeygenOptions): CuserAuth

Defined in auth/auth.js:24

Parameters:

Name Type
node IPFSAPI | Promise<IPFSAPI>
secret string
opts CuserCryptoKeygenOptions

Returns: CuserAuth

Methods

authenticate

authenticate(payload: PayloadUser): Promise<string>

Defined in auth/auth.js:45

Parameters:

Name Type
payload PayloadUser

Returns: Promise<string>


decode

decode(accessToken: string): Promise<PayloadUser & { iat: Number }>

Defined in auth/auth.js:55

Parameters:

Name Type
accessToken string

Returns: Promise<PayloadUser & { iat: Number }>

}