Java Code Examples for org.keycloak.Config#init()
The following examples show how to use
org.keycloak.Config#init() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: KeycloakApplication.java From keycloak with Apache License 2.0 | 5 votes |
protected void loadConfig() { ServiceLoader<ConfigProviderFactory> loader = ServiceLoader.load(ConfigProviderFactory.class, KeycloakApplication.class.getClassLoader()); try { ConfigProviderFactory factory = loader.iterator().next(); logger.debugv("ConfigProvider: {0}", factory.getClass().getName()); Config.init(factory.create().orElseThrow(() -> new RuntimeException("Failed to load Keycloak configuration"))); } catch (NoSuchElementException e) { throw new RuntimeException("No valid ConfigProvider found"); } }
Example 2
Source File: EmbeddedKeycloakApplication.java From spring-security-oauth with MIT License | 4 votes |
protected void loadConfig() { JsonConfigProviderFactory factory = new RegularJsonConfigProviderFactory(); Config.init(factory.create() .orElseThrow(() -> new NoSuchElementException("No value present"))); }
Example 3
Source File: EmbeddedKeycloakApplication.java From spring-security-oauth with MIT License | 4 votes |
protected void loadConfig() { JsonConfigProviderFactory factory = new RegularJsonConfigProviderFactory(); Config.init(factory.create() .orElseThrow(() -> new NoSuchElementException("No value present"))); }
Example 4
Source File: EmbeddedKeycloakApplication.java From spring-security-oauth with MIT License | 4 votes |
protected void loadConfig() { JsonConfigProviderFactory factory = new RegularJsonConfigProviderFactory(); Config.init(factory.create() .orElseThrow(() -> new NoSuchElementException("No value present"))); }
Example 5
Source File: EmbeddedKeycloakApplication.java From spring-boot-keycloak-server-example with Apache License 2.0 | 4 votes |
protected void loadConfig() { Config.init(configProvider); }