Commit c70d9885 authored by michael.simon's avatar michael.simon
Browse files

Make openid connect login panel optional

parent e180f49a
...@@ -23,6 +23,7 @@ import javax.faces.context.FacesContext; ...@@ -23,6 +23,7 @@ import javax.faces.context.FacesContext;
import javax.faces.event.ComponentSystemEvent; import javax.faces.event.ComponentSystemEvent;
import javax.inject.Inject; import javax.inject.Inject;
import edu.kit.scc.webreg.bootstrap.ApplicationConfig;
import edu.kit.scc.webreg.entity.FederationEntity; import edu.kit.scc.webreg.entity.FederationEntity;
import edu.kit.scc.webreg.entity.SamlIdpMetadataEntity; import edu.kit.scc.webreg.entity.SamlIdpMetadataEntity;
import edu.kit.scc.webreg.entity.SamlSpConfigurationEntity; import edu.kit.scc.webreg.entity.SamlSpConfigurationEntity;
...@@ -58,6 +59,9 @@ public class DiscoveryLoginBean implements Serializable { ...@@ -58,6 +59,9 @@ public class DiscoveryLoginBean implements Serializable {
@Inject @Inject
private FacesMessageGenerator messageGenerator; private FacesMessageGenerator messageGenerator;
@Inject
private ApplicationConfig appConfig;
private List<FederationEntity> federationList; private List<FederationEntity> federationList;
private List<SamlIdpMetadataEntity> idpList; private List<SamlIdpMetadataEntity> idpList;
private FederationEntity selectedFederation; private FederationEntity selectedFederation;
...@@ -219,4 +223,8 @@ public class DiscoveryLoginBean implements Serializable { ...@@ -219,4 +223,8 @@ public class DiscoveryLoginBean implements Serializable {
this.selectedOidcRp = selectedOidcRp; this.selectedOidcRp = selectedOidcRp;
} }
public ApplicationConfig getAppConfig() {
return appConfig;
}
} }
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
update=":form" /> update=":form" />
</p:panel> </p:panel>
<p:panel header="OIDC Test"> <p:panel header="OIDC Test" rendered="#{'true'.equalsIgnoreCase(discoveryLoginBean.appConfig.getConfigValue('show_oidc_login'))}">
<h:panelGrid id="oidcBaseData" columns="2" style="margin-top: 8px;"> <h:panelGrid id="oidcBaseData" columns="2" style="margin-top: 8px;">
<p:outputLabel value="#{messages.home_org}:" for="idpBox" /> <p:outputLabel value="#{messages.home_org}:" for="idpBox" />
<p:selectOneListbox id="oidcBox" value="#{discoveryLoginBean.selectedOidcRp}" scrollHeight="120" style="width:300px;" <p:selectOneListbox id="oidcBox" value="#{discoveryLoginBean.selectedOidcRp}" scrollHeight="120" style="width:300px;"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment