Skip to main content

Class: Auth

api/src.Auth

Constructors

constructor

Private new Auth(options)

Parameters

NameType
optionsServerOptionsAuth

Defined in

projects/plugins/packages/api/src/lib/structures/http/Auth.ts:48

Properties

#secret

Private #secret: string

Defined in

projects/plugins/packages/api/src/lib/structures/http/Auth.ts:46


cookie: string

Defined in

projects/plugins/packages/api/src/lib/structures/http/Auth.ts:24


domainOverwrite

domainOverwrite: null | string = null

Defined in

projects/plugins/packages/api/src/lib/structures/http/Auth.ts:44


id

id: string

Defined in

projects/plugins/packages/api/src/lib/structures/http/Auth.ts:18


redirect

redirect: undefined | string

Defined in

projects/plugins/packages/api/src/lib/structures/http/Auth.ts:36


scopes

scopes: readonly string[]

Defined in

projects/plugins/packages/api/src/lib/structures/http/Auth.ts:30


transformers

transformers: LoginDataTransformer<LoginData>[]

Defined in

projects/plugins/packages/api/src/lib/structures/http/Auth.ts:42

Accessors

secret

get secret(): string

Returns

string

Defined in

projects/plugins/packages/api/src/lib/structures/http/Auth.ts:62

Methods

decrypt

decrypt(token): null | AuthData

Parameters

NameTypeDescription
tokenstring

Returns

null | AuthData

Defined in

projects/plugins/packages/api/src/lib/structures/http/Auth.ts:84


encrypt

encrypt(data): string

Parameters

NameTypeDescription
dataAuthData

Returns

string

Defined in

projects/plugins/packages/api/src/lib/structures/http/Auth.ts:72


fetchData

fetchData(token): Promise<LoginData>

Parameters

NameTypeDescription
tokenstring

Returns

Promise<LoginData>

Defined in

projects/plugins/packages/api/src/lib/structures/http/Auth.ts:102


fetchInformation

Private fetchInformation<T>(scope, token, url): Promise<undefined | null | T>

Type parameters

Name
T

Parameters

NameType
scopestring
tokenstring
urlstring

Returns

Promise<undefined | null | T>

Defined in

projects/plugins/packages/api/src/lib/structures/http/Auth.ts:121


create

Static create(options?): null | Auth

Parameters

NameType
options?ServerOptionsAuth

Returns

null | Auth

Defined in

projects/plugins/packages/api/src/lib/structures/http/Auth.ts:133