use of org.olat.login.oauth.spi.OpenIdConnectFullConfigurableProvider in project OpenOLAT by OpenOLAT.
the class OAuthAdminController method initCustomProviders.
private void initCustomProviders() {
// remove old ones
for (ConfigurableProviderWrapper providerWrapper : providerWrappers) {
FormItemContainer layoutCont = providerWrapper.getLayoutCont();
customProvidersCont.remove(layoutCont);
}
providerWrappers.clear();
List<OAuthSPI> configurableSpies = oauthModule.getAllConfigurableSPIs();
for (OAuthSPI configurableSpi : configurableSpies) {
if (configurableSpi instanceof OpenIdConnectFullConfigurableProvider) {
ConfigurableProviderWrapper wrapper = initOpenIDConnectIFFullConfigurableProviders(customProvidersCont, (OpenIdConnectFullConfigurableProvider) configurableSpi);
if (wrapper != null) {
providerWrappers.add(wrapper);
}
}
}
}
use of org.olat.login.oauth.spi.OpenIdConnectFullConfigurableProvider in project OpenOLAT by OpenOLAT.
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;
}
use of org.olat.login.oauth.spi.OpenIdConnectFullConfigurableProvider in project OpenOLAT by OpenOLAT.
the class OAuthAdminController method doDelete.
private void doDelete(ConfigurableProviderWrapper providerWrapper) {
OAuthSPI spi = providerWrapper.getSpi();
if (spi instanceof OpenIdConnectFullConfigurableProvider) {
oauthModule.removeAdditionalOpenIDConnectIF(spi.getProviderName());
}
initCustomProviders();
}
use of org.olat.login.oauth.spi.OpenIdConnectFullConfigurableProvider in project openolat by klemens.
the class OAuthAdminController method doDelete.
private void doDelete(ConfigurableProviderWrapper providerWrapper) {
OAuthSPI spi = providerWrapper.getSpi();
if (spi instanceof OpenIdConnectFullConfigurableProvider) {
oauthModule.removeAdditionalOpenIDConnectIF(spi.getProviderName());
}
initCustomProviders();
}
use of org.olat.login.oauth.spi.OpenIdConnectFullConfigurableProvider in project openolat by klemens.
the class OAuthAdminController method initCustomProviders.
private void initCustomProviders() {
// remove old ones
for (ConfigurableProviderWrapper providerWrapper : providerWrappers) {
FormItemContainer layoutCont = providerWrapper.getLayoutCont();
customProvidersCont.remove(layoutCont);
}
providerWrappers.clear();
List<OAuthSPI> configurableSpies = oauthModule.getAllConfigurableSPIs();
for (OAuthSPI configurableSpi : configurableSpies) {
if (configurableSpi instanceof OpenIdConnectFullConfigurableProvider) {
ConfigurableProviderWrapper wrapper = initOpenIDConnectIFFullConfigurableProviders(customProvidersCont, (OpenIdConnectFullConfigurableProvider) configurableSpi);
if (wrapper != null) {
providerWrappers.add(wrapper);
}
}
}
}
Aggregations