Skip to content

Latest commit

 

History

History
160 lines (88 loc) · 3.67 KB

class.AuthenticationService.md

File metadata and controls

160 lines (88 loc) · 3.67 KB

directus-monorepo ( Readme | API )


directus-monorepo > AuthenticationService

Class: AuthenticationService

Constructors

constructor()

new AuthenticationService(options): AuthenticationService

Parameters

Parameter Type
options AbstractServiceOptions

Returns

AuthenticationService

Source

api/src/services/authentication.ts:30

Properties

accountability

accountability: any

Source

api/src/services/authentication.ts:26


activityService

activityService: ActivityService

Source

api/src/services/authentication.ts:27


knex

knex: Knex< any, any[] >

Source

api/src/services/authentication.ts:25


schema

schema: SchemaOverview

Source

api/src/services/authentication.ts:28

Methods

login()

login( providerName = DEFAULT_AUTH_PROVIDER, payload, otp?): Promise< LoginResult >

Retrieve the tokens for a given user email.

Password is optional to allow usage of this function within the SSO flow and extensions. Make sure to handle password existence checks elsewhere

Parameters

Parameter Type Default value
providerName string DEFAULT_AUTH_PROVIDER
payload Record< string, any > undefined
otp? string undefined

Returns

Promise< LoginResult >

Source

api/src/services/authentication.ts:43


logout()

logout(refreshToken): Promise< void >

Parameters

Parameter Type
refreshToken string

Returns

Promise< void >

Source

api/src/services/authentication.ts:401


refresh()

refresh(refreshToken): Promise< Record< string, any > >

Parameters

Parameter Type
refreshToken string

Returns

Promise< Record< string, any > >

Source

api/src/services/authentication.ts:252


verifyPassword()

verifyPassword(userID, password): Promise< void >

Parameters

Parameter Type
userID string
password string

Returns

Promise< void >

Source

api/src/services/authentication.ts:430


Generated using TypeDoc and typedoc-plugin-markdown