@cuser/auth
v0.0.36
Published
auth core utility
Downloads
22
Readme
Status
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 }>
}