Fix field error message field name. (#1266)
This commit is contained in:
1 parent
f14d8ced2c
commit
4bd480c183
2 files changed
+3
-3
No files matched your search
@@ -916,7 +916,7 @@ func validateCreateRequest(req *pbs.CreateAuthMethodRequest) error {
|
||||
}
|
||||
if len(attrs.GetIdpCaCerts()) > 0 {
|
||||
if _, err := oidc.ParseCertificates(attrs.GetIdpCaCerts()...); err != nil {
|
||||
badFields[caCertsField] = fmt.Sprintf("Cannot parse CA certificates. %v", err.Error())
|
||||
badFields[idpCaCertsField] = fmt.Sprintf("Cannot parse CA certificates. %v", err.Error())
|
||||
}
|
||||
}
|
||||
if len(attrs.GetClaimsScopes()) > 0 {
|
||||
@@ -1037,7 +1037,7 @@ func validateUpdateRequest(req *pbs.UpdateAuthMethodRequest) error {
|
||||
}
|
||||
if len(attrs.GetIdpCaCerts()) > 0 {
|
||||
if _, err := oidc.ParseCertificates(attrs.GetIdpCaCerts()...); err != nil {
|
||||
badFields[caCertsField] = fmt.Sprintf("Cannot parse CA certificates. %v", err.Error())
|
||||
badFields[idpCaCertsField] = fmt.Sprintf("Cannot parse CA certificates. %v", err.Error())
|
||||
}
|
||||
}
|
||||
if len(attrs.GetClaimsScopes()) > 0 {
|
||||
|
||||
@@ -36,7 +36,7 @@ const (
|
||||
stateField = "attributes.state"
|
||||
callbackUrlField = "attributes.callback_url"
|
||||
apiUrlPrefixField = "attributes.api_url_prefix"
|
||||
caCertsField = "attributes.ca_certs"
|
||||
idpCaCertsField = "attributes.idp_ca_certs"
|
||||
signingAlgorithmField = "attributes.signing_algorithms"
|
||||
disableDiscoveredConfigValidationField = "attributes.disable_discovered_config_validation"
|
||||
roundtripPayloadAttributesField = "attributes.roundtrip_payload"
|
||||
|
||||
Reference in new issue
Block a user