Move prefixes for many packages into the globals package (#3069)
This is a prerequisite for some enhancements to grant validation
This commit is contained in:
1 parent
6adc0c86b5
commit
b76b24a4ad
115 files changed
+796
-729
No files matched your search
@@ -829,7 +829,7 @@ func validateGetRequest(req *pbs.GetAuthMethodRequest) error {
|
||||
if req == nil {
|
||||
return errors.NewDeprecated(errors.InvalidParameter, op, "Missing request")
|
||||
}
|
||||
return handlers.ValidateGetRequest(handlers.NoopValidatorFn, req, password.AuthMethodPrefix, oidc.AuthMethodPrefix)
|
||||
return handlers.ValidateGetRequest(handlers.NoopValidatorFn, req, globals.PasswordAuthMethodPrefix, globals.OidcAuthMethodPrefix)
|
||||
}
|
||||
|
||||
func validateCreateRequest(ctx context.Context, req *pbs.CreateAuthMethodRequest) error {
|
||||
@@ -1055,7 +1055,7 @@ func validateUpdateRequest(ctx context.Context, req *pbs.UpdateAuthMethodRequest
|
||||
badFields["id"] = "Incorrectly formatted identifier."
|
||||
}
|
||||
return badFields
|
||||
}, password.AuthMethodPrefix, oidc.AuthMethodPrefix)
|
||||
}, globals.PasswordAuthMethodPrefix, globals.OidcAuthMethodPrefix)
|
||||
}
|
||||
|
||||
func validateDeleteRequest(req *pbs.DeleteAuthMethodRequest) error {
|
||||
@@ -1063,7 +1063,7 @@ func validateDeleteRequest(req *pbs.DeleteAuthMethodRequest) error {
|
||||
if req == nil {
|
||||
return errors.NewDeprecated(errors.InvalidParameter, op, "Missing request")
|
||||
}
|
||||
return handlers.ValidateDeleteRequest(handlers.NoopValidatorFn, req, password.AuthMethodPrefix, oidc.AuthMethodPrefix)
|
||||
return handlers.ValidateDeleteRequest(handlers.NoopValidatorFn, req, globals.PasswordAuthMethodPrefix, globals.OidcAuthMethodPrefix)
|
||||
}
|
||||
|
||||
func validateListRequest(req *pbs.ListAuthMethodsRequest) error {
|
||||
|
||||
Reference in new issue
Block a user