use otp as oauth2.password
This commit is contained in:
parent
268d12372d
commit
9bb628b2a7
|
@ -224,6 +224,13 @@
|
|||
var type = 'access_token';
|
||||
var grantType = 'password';
|
||||
|
||||
if (!passphrase) {
|
||||
if (opts.otp) {
|
||||
// for backwards compat
|
||||
passphrase = opts.otp; // 'otp:' + opts.otpUuid + ':' + opts.otp;
|
||||
}
|
||||
}
|
||||
|
||||
var scope = opts.scope || directive.authn_scope;
|
||||
var clientId = opts.appId;
|
||||
var clientAgreeTos = opts.clientAgreeTos;
|
||||
|
@ -232,8 +239,6 @@
|
|||
var params = {
|
||||
"grant_type": grantType
|
||||
, "username": username
|
||||
// ('otp:' + opts.otpUuid + ':' + opts.otp)) // for backwards compat?
|
||||
// ('totp:' + opts.totp) // for backwards compat?
|
||||
, "password": passphrase || undefined
|
||||
, "totp": opts.totp || opts.totpToken || undefined
|
||||
, "otp": opts.otp || opts.otpCode || undefined
|
||||
|
|
Loading…
Reference in New Issue