Skip to content

Commit e2c482e

Browse files
committed
refactor,fix: fix logging package name in application.yaml, enable support for ESTEID 2015 test certificates in development profile
Signed-off-by: Mart Somermaa <[email protected]>
1 parent a20cb3a commit e2c482e

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

example/src/main/java/eu/webeid/example/config/ValidationConfiguration.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,15 @@ public X509Certificate[] loadTrustedCACertificatesFromTrustStore() {
126126
@Bean
127127
public AuthTokenValidator validator() {
128128
try {
129-
return new AuthTokenValidatorBuilder()
129+
AuthTokenValidatorBuilder validatorBuilder = new AuthTokenValidatorBuilder()
130130
.withSiteOrigin(URI.create(yamlConfig().getLocalOrigin()))
131131
.withTrustedCertificateAuthorities(loadTrustedCACertificatesFromCerFiles())
132-
.withTrustedCertificateAuthorities(loadTrustedCACertificatesFromTrustStore())
133-
.build();
132+
.withTrustedCertificateAuthorities(loadTrustedCACertificatesFromTrustStore());
133+
if (activeProfile.equals("dev")) {
134+
// Enable support for ESTEID 2015 test certificates in development profile.
135+
validatorBuilder = validatorBuilder.withNonceDisabledOcspUrls(URI.create("http://aia.demo.sk.ee/esteid2015"));
136+
}
137+
return validatorBuilder.build();
134138
} catch (JceException e) {
135139
throw new RuntimeException("Error building the Web eID auth token validator.", e);
136140
}

example/src/main/resources/application.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ server:
1414

1515
logging:
1616
level:
17-
org.webeid.security: DEBUG
18-
org.webeid.example: DEBUG
17+
eu.webeid.security: DEBUG
18+
eu.webeid.example: DEBUG
1919
org.springframework.security.web.csrf.CsrfFilter: DEBUG

0 commit comments

Comments
 (0)