use of org.olat.login.oauth.spi.OpenIdConnectFullConfigurableProvider in project openolat by klemens.
the class OAuthLoginModule method getAdditionalOpenIDConnectIF.
private OAuthSPI getAdditionalOpenIDConnectIF(String enableKey) {
String providerName = enableKey.substring(OPEN_ID_IF_START_MARKER.length(), enableKey.length() - OPEN_ID_IF_END_MARKER.length());
String rootEnabledObj = getStringPropertyValue("openIdConnectIF." + providerName + ".RootEnabled", true);
boolean rootEnabled = "true".equals(rootEnabledObj);
String apiKey = getStringPropertyValue("openIdConnectIF." + providerName + ".ApiKey", true);
String apiSecret = getStringPropertyValue("openIdConnectIF." + providerName + ".ApiSecret", true);
String issuer = getStringPropertyValue("openIdConnectIF." + providerName + ".Issuer", true);
String endPoint = getStringPropertyValue("openIdConnectIF." + providerName + ".AuthorizationEndPoint", true);
String displayName = getStringPropertyValue("openIdConnectIF." + providerName + ".DisplayName", true);
OpenIdConnectFullConfigurableProvider provider = new OpenIdConnectFullConfigurableProvider();
provider.setRootEnabled(rootEnabled);
provider.setName(providerName);
provider.setDisplayName(displayName);
provider.setProviderName(providerName);
provider.setAppKey(apiKey);
provider.setAppSecret(apiSecret);
provider.setIssuer(issuer);
provider.setEndPoint(endPoint);
return provider;
}
Aggregations