Skip to content

Commit

Permalink
Moves auth_url error message for non-OIDC flow into ui constants (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
austingebauer authored May 8, 2020
1 parent fffbc4e commit 175b36b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion path_oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 175b36b

Please sign in to comment.