Exclude Sensitive and Error-Prone Fields from toString() in SAML2 Configuration

This commit is contained in:
Ludy87 2024-12-18 13:40:24 +01:00
parent 74d6d96f4e
commit a531f53893
No known key found for this signature in database
GPG Key ID: 92696155E0220F94

View File

@ -122,18 +122,19 @@ public class ApplicationProperties {
@Getter
@Setter
@ToString
public static class SAML2 {
private Boolean enabled = false;
private Boolean autoCreateUser = false;
private Boolean blockRegistration = false;
private String registrationId = "stirling";
private String idpMetadataUri;
@ToString.Exclude private String idpMetadataUri;
private String idpSingleLogoutUrl;
private String idpSingleLoginUrl;
private String idpIssuer;
private String idpCert;
private String privateKey;
private String spCert;
@ToString.Exclude private String privateKey;
@ToString.Exclude private String spCert;
public InputStream getIdpMetadataUri() throws IOException {
if (idpMetadataUri.startsWith("classpath:")) {