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

Merge pull request 'OZG-4937 keycloak set user action token lifespan' (#14)...

Merge pull request 'OZG-4937 keycloak set user action token lifespan' (#14) from OZG-4937-keycloak-realm-action-token-lifespan into master

Reviewed-on: https://git.ozg-sh.de/ozgcloud-devops/operator/pulls/14
parents 64549afe eda33c24
No related branches found
No related tags found
No related merge requests found
...@@ -41,6 +41,7 @@ interface KeycloakRealmMapper { ...@@ -41,6 +41,7 @@ interface KeycloakRealmMapper {
@Mapping(target = "defaultLocale", constant = "de") @Mapping(target = "defaultLocale", constant = "de")
@Mapping(target = "internationalizationEnabled", constant = "true") @Mapping(target = "internationalizationEnabled", constant = "true")
@Mapping(target = "passwordPolicy", constant = "upperCase(1) and lowerCase(1) and length(8) and notUsername") @Mapping(target = "passwordPolicy", constant = "upperCase(1) and lowerCase(1) and length(8) and notUsername")
@Mapping(target = "actionTokenGeneratedByUserLifespan", constant = "900")
public RealmRepresentation map(OzgCloudKeycloakRealmSpec realm); public RealmRepresentation map(OzgCloudKeycloakRealmSpec realm);
@Named("supportedLocales") @Named("supportedLocales")
......
...@@ -82,4 +82,11 @@ class KeycloakRealmMapperTest { ...@@ -82,4 +82,11 @@ class KeycloakRealmMapperTest {
assertThat(mapped.getPasswordPolicy()).isEqualTo("upperCase(1) and lowerCase(1) and length(8) and notUsername"); 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