All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.adorsys.ledgers.keycloak.client.config.KeycloakConfig Maven / Gradle / Ivy

The newest version!
package de.adorsys.ledgers.keycloak.client.config;

import org.keycloak.admin.client.Keycloak;
import org.keycloak.admin.client.KeycloakBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class KeycloakConfig {

    @Bean
    Keycloak getKeycloakAdminClient(KeycloakClientConfig config) {
        return KeycloakBuilder.builder()
                       .serverUrl(config.getAuthServerUrl())
                       .realm(config.getMasterRealm())
                       .clientId("admin-cli")
                       .username(config.getUserName())
                       .password(config.getPassword())
                       .build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy