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

OZG-3961 get password from data instead of stringData

parent 41c56e46
No related branches found
No related tags found
No related merge requests found
......@@ -195,7 +195,7 @@ class KeycloakUserRemoteService {
}
private String getPasswordFromSecret(Resource<Secret> secret) {
return decodeBase64(secret.get().getStringData().get(SECRET_PASSWORD_FIELD));
return decodeBase64(secret.get().getData().get(SECRET_PASSWORD_FIELD));
}
private String decodeBase64(String base64String) {
......
......@@ -447,7 +447,7 @@ class KeycloakUserRemoteServiceTest {
private Resource<Secret> resource;
private OzgKeycloakUserSpec userSpec = OzgKeycloakUserSpecTestFactory.create();
private Secret secret = new SecretBuilder()
.addToStringData(KeycloakUserRemoteService.SECRET_PASSWORD_FIELD, Base64.getEncoder().encodeToString("dummyPassword".getBytes()))
.addToData(KeycloakUserRemoteService.SECRET_PASSWORD_FIELD, Base64.getEncoder().encodeToString("dummyPassword".getBytes()))
.build();
@Test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment