@accounts/types
Advanced tools
Comparing version 0.26.0-alpha.1 to 0.26.0-alpha.2
import { DatabaseInterface } from '../database-interface'; | ||
import { Authenticator } from './authenticator'; | ||
import { MfaChallenge } from '../mfa-challenge/mfa-challenge'; | ||
import { ConnectionInformations } from '../connection-informations'; | ||
export interface AuthenticatorService { | ||
@@ -8,6 +9,6 @@ server: any; | ||
setStore(store: DatabaseInterface): void; | ||
challenge?(mfaChallenge: MfaChallenge, authenticator: Authenticator): Promise<any>; | ||
associate(userId: string, params: any): Promise<any>; | ||
authenticate(authenticator: Authenticator, params: any): Promise<boolean>; | ||
associate(userId: string, params: any, infos: ConnectionInformations): Promise<any>; | ||
challenge?(mfaChallenge: MfaChallenge, authenticator: Authenticator, infos: ConnectionInformations): Promise<any>; | ||
authenticate(mfaChallenge: MfaChallenge, authenticator: Authenticator, params: any, infos: ConnectionInformations): Promise<boolean>; | ||
sanitize?(authenticator: Authenticator): Authenticator; | ||
} |
{ | ||
"name": "@accounts/types", | ||
"version": "0.26.0-alpha.1", | ||
"version": "0.26.0-alpha.2", | ||
"description": "Accounts-js Types", | ||
@@ -51,3 +51,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "ce6f04495e4de9ba5dcb04396aada2bb31e5880b" | ||
"gitHead": "ad0914817551b832a11600613981ae5dba11c09d" | ||
} |
import { DatabaseInterface } from '../database-interface'; | ||
import { Authenticator } from './authenticator'; | ||
import { MfaChallenge } from '../mfa-challenge/mfa-challenge'; | ||
import { ConnectionInformations } from '../connection-informations'; | ||
@@ -9,7 +10,16 @@ export interface AuthenticatorService { | ||
setStore(store: DatabaseInterface): void; | ||
challenge?(mfaChallenge: MfaChallenge, authenticator: Authenticator): Promise<any>; | ||
associate(userId: string, params: any): Promise<any>; | ||
authenticate(authenticator: Authenticator, params: any): Promise<boolean>; | ||
associate(userId: string, params: any, infos: ConnectionInformations): Promise<any>; | ||
challenge?( | ||
mfaChallenge: MfaChallenge, | ||
authenticator: Authenticator, | ||
infos: ConnectionInformations | ||
): Promise<any>; | ||
authenticate( | ||
mfaChallenge: MfaChallenge, | ||
authenticator: Authenticator, | ||
params: any, | ||
infos: ConnectionInformations | ||
): Promise<boolean>; | ||
sanitize?(authenticator: Authenticator): Authenticator; | ||
// TODO ability to delete an authenticator | ||
} |
64319
1138