@cuser/auth
TypeScript icon, indicating that this package has built-in type declarations

0.0.36 • Public • Published

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 }>

}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.36
    0
    • latest

Version History

Package Sidebar

Install

npm i @cuser/auth

Weekly Downloads

0

Version

0.0.36

License

MIT

Unpacked Size

9.85 kB

Total Files

7

Last publish

Collaborators

  • rubeniskov