Skip to content

Commit 8c94e0b

Browse files
committed
Add proxy.saml.max-authentication-age property
1 parent c2f3294 commit 8c94e0b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/main/java/eu/openanalytics/containerproxy/auth/impl/saml/SAMLConfiguration.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public class SAMLConfiguration {
8181

8282
private static final String PROP_LOG_ATTRIBUTES = "proxy.saml.log-attributes";
8383
private static final String PROP_FORCE_AUTHN = "proxy.saml.force-authn";
84+
private static final String PROP_MAX_AUTHENTICATION_AGE = "proxy.saml.max-authentication-age";
8485
private static final String PROP_KEYSTORE = "proxy.saml.keystore";
8586
private static final String PROP_ENCRYPTION_CERT_NAME = "proxy.saml.encryption-cert-name";
8687
private static final String PROP_ENCRYPTION_CERT_PASSWORD = "proxy.saml.encryption-cert-password";
@@ -98,7 +99,7 @@ public class SAMLConfiguration {
9899

99100
@Inject
100101
private UserLogoutHandler userLogoutHandler;
101-
102+
102103
@Bean
103104
public SAMLEntryPoint samlEntryPoint() {
104105
SAMLEntryPoint samlEntryPoint = new SAMLEntryPoint();
@@ -314,7 +315,12 @@ public AlreadyLoggedInFilter alreadyLoggedInFilter() {
314315

315316
@Bean
316317
public WebSSOProfileConsumer webSSOprofileConsumer() {
317-
return new WebSSOProfileConsumerImpl();
318+
WebSSOProfileConsumerImpl res = new WebSSOProfileConsumerImpl();
319+
Integer maxAuthenticationAge = environment.getProperty(PROP_MAX_AUTHENTICATION_AGE, Integer.class);
320+
if (maxAuthenticationAge != null) {
321+
res.setMaxAuthenticationAge(maxAuthenticationAge);
322+
}
323+
return res;
318324
}
319325

320326
@Bean

0 commit comments

Comments
 (0)