This is an automated email from the ASF dual-hosted git repository.
ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/master by this push:
new 4e7d447 Fix following CAS code changes
4e7d447 is described below
commit 4e7d447f9347f83f469e3aeaa286ec7d3385de00
Author: Francesco Chicchiriccò <[email protected]>
AuthorDate: Fri Dec 24 13:34:31 2021 +0100
Fix following CAS code changes
---
.../wa/starter/config/SyncopeWAConfiguration.java | 25 +++++++++++-----------
.../starter/u2f/SyncopeWAU2FDeviceRepository.java | 4 +++-
2 files changed, 16 insertions(+), 13 deletions(-)
diff --git
a/wa/starter/src/main/java/org/apache/syncope/wa/starter/config/SyncopeWAConfiguration.java
b/wa/starter/src/main/java/org/apache/syncope/wa/starter/config/SyncopeWAConfiguration.java
index ccb9625..6aff8a3 100644
---
a/wa/starter/src/main/java/org/apache/syncope/wa/starter/config/SyncopeWAConfiguration.java
+++
b/wa/starter/src/main/java/org/apache/syncope/wa/starter/config/SyncopeWAConfiguration.java
@@ -250,8 +250,8 @@ public class SyncopeWAConfiguration {
@Autowired
@Bean
public CasEventRepository casEventRepository(final WARestClient restClient,
-
@Qualifier("syncopeWAEventRepositoryFilter")
- final
CasEventRepositoryFilter syncopeWAEventRepositoryFilter) {
+ @Qualifier("syncopeWAEventRepositoryFilter")
+ final CasEventRepositoryFilter syncopeWAEventRepositoryFilter) {
return new SyncopeWAEventRepository(syncopeWAEventRepositoryFilter,
restClient);
}
@@ -263,8 +263,8 @@ public class SyncopeWAConfiguration {
@Bean
public OneTimeTokenRepository oneTimeTokenAuthenticatorTokenRepository(
- final CasConfigurationProperties casProperties,
- final WARestClient restClient) {
+ final CasConfigurationProperties casProperties,
+ final WARestClient restClient) {
return new SyncopeWAGoogleMfaAuthTokenRepository(
restClient,
casProperties.getAuthn().getMfa().getGauth().getCore().getTimeStepSize());
}
@@ -280,8 +280,8 @@ public class SyncopeWAConfiguration {
@Autowired
@Bean
public OidcJsonWebKeystoreGeneratorService
oidcJsonWebKeystoreGeneratorService(
- final ConfigurableApplicationContext ctx,
- final WARestClient restClient) {
+ final ConfigurableApplicationContext ctx,
+ final WARestClient restClient) {
int size = ctx.getEnvironment().
getProperty("cas.authn.oidc.jwks.size", int.class, 2048);
JWSAlgorithm algorithm = ctx.getEnvironment().
@@ -292,23 +292,24 @@ public class SyncopeWAConfiguration {
@RefreshScope
@Bean
public WebAuthnCredentialRepository webAuthnCredentialRepository(
- final CasConfigurationProperties casProperties,
- final WARestClient restClient) {
+ final CasConfigurationProperties casProperties,
+ final WARestClient restClient) {
return new SyncopeWAWebAuthnCredentialRepository(casProperties,
restClient);
}
@Bean
@RefreshScope
public U2FDeviceRepository u2fDeviceRepository(
- final CasConfigurationProperties casProperties,
- final WARestClient restClient) {
+ final CasConfigurationProperties casProperties,
+ final WARestClient restClient) {
+
U2FCoreMultifactorAuthenticationProperties u2f =
casProperties.getAuthn().getMfa().getU2f().getCore();
LocalDate expirationDate = LocalDate.now(ZoneId.systemDefault()).
minus(u2f.getExpireDevices(),
DateTimeUtils.toChronoUnit(u2f.getExpireDevicesTimeUnit()));
LoadingCache<String, String> requestStorage = Caffeine.newBuilder().
expireAfterWrite(u2f.getExpireRegistrations(),
u2f.getExpireRegistrationsTimeUnit()).
build(key -> StringUtils.EMPTY);
- return new SyncopeWAU2FDeviceRepository(requestStorage, restClient,
expirationDate);
+ return new SyncopeWAU2FDeviceRepository(casProperties, requestStorage,
restClient, expirationDate);
}
@Bean
@@ -342,7 +343,7 @@ public class SyncopeWAConfiguration {
@Bean
public CasThymeleafLoginFormDirector casThymeleafLoginFormDirector(
- @Qualifier("casWebflowExecutionPlan") final CasWebflowExecutionPlan
webflowExecutionPlan) {
+ @Qualifier("casWebflowExecutionPlan") final
CasWebflowExecutionPlan webflowExecutionPlan) {
return new CasThymeleafLoginFormDirector(webflowExecutionPlan);
}
}
diff --git
a/wa/starter/src/main/java/org/apache/syncope/wa/starter/u2f/SyncopeWAU2FDeviceRepository.java
b/wa/starter/src/main/java/org/apache/syncope/wa/starter/u2f/SyncopeWAU2FDeviceRepository.java
index dc61094..f6539fb 100644
---
a/wa/starter/src/main/java/org/apache/syncope/wa/starter/u2f/SyncopeWAU2FDeviceRepository.java
+++
b/wa/starter/src/main/java/org/apache/syncope/wa/starter/u2f/SyncopeWAU2FDeviceRepository.java
@@ -34,6 +34,7 @@ import
org.apache.syncope.common.rest.api.service.wa.U2FRegistrationService;
import org.apache.syncope.wa.bootstrap.WARestClient;
import org.apereo.cas.adaptors.u2f.storage.BaseU2FDeviceRepository;
import org.apereo.cas.adaptors.u2f.storage.U2FDeviceRegistration;
+import org.apereo.cas.configuration.CasConfigurationProperties;
import org.apereo.cas.util.crypto.CipherExecutor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -48,11 +49,12 @@ public class SyncopeWAU2FDeviceRepository extends
BaseU2FDeviceRepository {
private final LocalDate expirationDate;
public SyncopeWAU2FDeviceRepository(
+ final CasConfigurationProperties casProperties,
final LoadingCache<String, String> requestStorage,
final WARestClient waRestClient,
final LocalDate expirationDate) {
- super(requestStorage, CipherExecutor.noOpOfSerializableToString());
+ super(casProperties, requestStorage,
CipherExecutor.noOpOfSerializableToString());
this.waRestClient = waRestClient;
this.expirationDate = expirationDate;
}