From 175b36bab10d932d581b01db8e94dd78bd23a49e Mon Sep 17 00:00:00 2001 From: Austin Gebauer <34121980+austingebauer@users.noreply.github.com> Date: Fri, 8 May 2020 16:04:05 -0700 Subject: [PATCH] Moves auth_url error message for non-OIDC flow into ui constants (#112) --- path_oidc.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/path_oidc.go b/path_oidc.go index 6c5a9ee2..36345600 100644 --- a/path_oidc.go +++ b/path_oidc.go @@ -28,6 +28,7 @@ const ( errLoginFailed = "Vault login failed." errNoResponse = "No response from provider." errTokenVerification = "Token verification failed." + errNotOIDCFlow = "OIDC login is not configured for this mount" noCode = "no_code" ) @@ -344,7 +345,7 @@ func (b *jwtAuthBackend) authURL(ctx context.Context, req *logical.Request, d *f } if config.authType() != OIDCFlow { - return logical.ErrorResponse("OIDC login is not configured for this mount"), nil + return logical.ErrorResponse(errNotOIDCFlow), nil } roleName := d.Get("role").(string)