Skip to content
Snippets Groups Projects
Commit eda33c24 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-4937 keycloak set user action token lifespan

parent 64549afe
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,7 @@ interface KeycloakRealmMapper {
@Mapping(target = "defaultLocale", constant = "de")
@Mapping(target = "internationalizationEnabled", constant = "true")
@Mapping(target = "passwordPolicy", constant = "upperCase(1) and lowerCase(1) and length(8) and notUsername")
@Mapping(target = "actionTokenGeneratedByUserLifespan", constant = "900")
public RealmRepresentation map(OzgCloudKeycloakRealmSpec realm);
@Named("supportedLocales")
......
......@@ -82,4 +82,11 @@ class KeycloakRealmMapperTest {
assertThat(mapped.getPasswordPolicy()).isEqualTo("upperCase(1) and lowerCase(1) and length(8) and notUsername");
}
@Test
void shouldSetActionTokenGeneratedByUserLifespan() {
var mapped = mapper.map(OzgCloudKeycloakRealmSpecTestFactory.create());
assertThat(mapped.getActionTokenGeneratedByUserLifespan()).isEqualTo(900);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment