Skip to content

Commit 175b36b

Browse files
Moves auth_url error message for non-OIDC flow into ui constants (#112)
1 parent fffbc4e commit 175b36b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

path_oidc.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const (
2828
errLoginFailed = "Vault login failed."
2929
errNoResponse = "No response from provider."
3030
errTokenVerification = "Token verification failed."
31+
errNotOIDCFlow = "OIDC login is not configured for this mount"
3132

3233
noCode = "no_code"
3334
)
@@ -344,7 +345,7 @@ func (b *jwtAuthBackend) authURL(ctx context.Context, req *logical.Request, d *f
344345
}
345346

346347
if config.authType() != OIDCFlow {
347-
return logical.ErrorResponse("OIDC login is not configured for this mount"), nil
348+
return logical.ErrorResponse(errNotOIDCFlow), nil
348349
}
349350

350351
roleName := d.Get("role").(string)

0 commit comments

Comments
 (0)