retry basic auth also when IAM returns 400
This commit is contained in:
parent
63806e6a6b
commit
66a86dfe1a
|
@ -158,7 +158,7 @@ function requestToken(context){
|
||||||
context.authn.verified_token =
|
context.authn.verified_token =
|
||||||
JSON.parse(Buffer.from(context.authn.token.split('.')[1], 'base64url').toString())
|
JSON.parse(Buffer.from(context.authn.token.split('.')[1], 'base64url').toString())
|
||||||
return context
|
return context
|
||||||
} else if (reply.status === 401){
|
} else if (reply.status === 400 || reply.status === 401){
|
||||||
var options = {
|
var options = {
|
||||||
"body" : "grant_type=password&username="+context.authn.user+"&password="+context.authn.password
|
"body" : "grant_type=password&username="+context.authn.user+"&password="+context.authn.password
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue