X-Git-Url: http://git.squeep.com/?p=squeep-authentication-module;a=blobdiff_plain;f=lib%2Fauthenticator.js;h=36c1574b507c223fe380a35ab6f0eb991de085e4;hp=7390db5d8803c8271e0cbc32c254e3198d057df0;hb=54ca04e330d14a12344ddc2b161c1d9b55bfd7d7;hpb=53ef948ea83106e82d55e60d6695a15e94bf725e diff --git a/lib/authenticator.js b/lib/authenticator.js index 7390db5..36c1574 100644 --- a/lib/authenticator.js +++ b/lib/authenticator.js @@ -33,7 +33,7 @@ class Authenticator { * @property {(DBContextExec) => Promise} context * @property {(dbCtx: any, identifier: String) => Promise } authenticationGet * @property {(dbCtx: any, identifier: String) => Promise} authenticationSuccess - * @property {(dbCtx: any, identifier: String, credential: String, otpKey: String=) => Promise} authenticationInsertIdentifier + * @property {(dbCtx: any, identifier: String, credential: String, otpKey: String=) => Promise} authenticationUpsert * @property {(dbCtx: any, identifier: String, otpKey: String) => Promise} authenticationUpdateOTPKey * @property {(dbCtx: any, identifier: String, credential: AuthInfo) => Promise} authenticationUpdateCredential */ @@ -117,7 +117,7 @@ class Authenticator { const _scope = _fileScope('createIdentifier'); try { const secureCredential = await this._secureCredential(credential); - await this.db.authenticationInsertIdentifier(dbCtx, identifier, secureCredential, otpKey); + await this.db.authenticationUpsert(dbCtx, identifier, secureCredential, otpKey); } catch (e) { this.logger.error(_scope, 'failed', { error: e, identifier }); throw e;