Padloc Logo Docs & Resources

Class: EmailAuthServer

auth/email.EmailAuthServer

Implements

Constructors

constructor

new EmailAuthServer(messenger)

Parameters

Name Type
messenger Messenger

Defined in

core/src/auth/email.ts:8

Properties

messenger

messenger: Messenger

Methods

_generateCode

Private _generateCode(len?): Promise<string>

Parameters

Name Type Default value
len number 6

Returns

Promise<string>

Defined in

core/src/auth/email.ts:76


activateAuthenticator

activateAuthenticator(authenticator, __namedParameters): Promise<void>

Parameters

Name Type
authenticator Authenticator<any>
__namedParameters Object
__namedParameters.code string

Returns

Promise<void>

Implementation of

AuthServer.activateAuthenticator

Defined in

core/src/auth/email.ts:34


initAuthRequest

initAuthRequest(authenticator, request): Promise<{ email: any ; sentAt: string ; subject: string = message.title }>

Parameters

Name Type
authenticator Authenticator<any>
request AuthRequest<any>

Returns

Promise<{ email: any ; sentAt: string ; subject: string = message.title }>

Implementation of

AuthServer.initAuthRequest

Defined in

core/src/auth/email.ts:44


initAuthenticator

initAuthenticator(authenticator, auth, __namedParameters?): Promise<{ email: string ; requestId: string ; sentAt: string } | { email: string ; requestId: undefined ; sentAt: undefined }>

Parameters

Name Type
authenticator Authenticator<any>
auth Auth
__namedParameters Object
__namedParameters.email? string

Returns

Promise<{ email: string ; requestId: string ; sentAt: string } | { email: string ; requestId: undefined ; sentAt: undefined }>

Implementation of

AuthServer.initAuthenticator

Defined in

core/src/auth/email.ts:14


supportsType

supportsType(type): boolean

Parameters

Name Type
type AuthType

Returns

boolean

Implementation of

AuthServer.supportsType

Defined in

core/src/auth/email.ts:10


verifyAuthRequest

verifyAuthRequest(_method, request, __namedParameters): Promise<void>

Parameters

Name Type
_method Authenticator<any>
request AuthRequest<any>
__namedParameters Object
__namedParameters.code string

Returns

Promise<void>

Implementation of

AuthServer.verifyAuthRequest

Defined in

core/src/auth/email.ts:62