index.xhtml 4.85 KB
Newer Older
michael.simon's avatar
michael.simon committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<head>
<title></title>
</head>
<body>
	<f:metadata>
		<f:event type="javax.faces.event.PreRenderViewEvent"
            listener="#{discoveryLoginBean.preRenderView}" />
	</f:metadata>

<ui:composition template="/template/default.xhtml">
	<ui:param name="title" value="#{messages.title}"/>

	<ui:define name="metadata">
		<meta http-equiv="refresh" content="600;url=index.xhtml" />	
	</ui:define>

	<ui:define name="content">

michael.simon's avatar
michael.simon committed
26
27
28
	<h:form id="form" prependId="false" class="full form">
		<h3><h:outputText value="#{messages.welcome}"/></h3>
		<p:panel>
29
30
31
32
33
34
			<p:outputPanel rendered="#{empty discoveryLoginBean.spMetadata and empty discoveryLoginBean.clientConfig}" style="margin-top: 8px;">
				<h:outputText value="#{messages.welcome_disco}"/>
			</p:outputPanel>
			
			<p:outputPanel rendered="#{not empty discoveryLoginBean.spMetadata}" style="margin-top: 8px;">
				<h:outputText value="#{messages.welcome_redirected}" /><br/>
35
36
37
38
				<b>
					<h:outputText value="#{discoveryLoginBean.spMetadata.displayName}" rendered="#{not empty discoveryLoginBean.spMetadata.displayName}" />
					<h:outputText value="#{discoveryLoginBean.spMetadata.entityId}" rendered="#{empty discoveryLoginBean.spMetadata.displayName}" />
				</b>			
39
40
41
42
43
44
45
46
47
48
			</p:outputPanel>

			<p:outputPanel rendered="#{not empty discoveryLoginBean.clientConfig}" style="margin-top: 8px;">
				<h:outputText value="#{messages.welcome_redirected}" /><br/> 
				<b> 
					<h:outputText value="#{discoveryLoginBean.clientConfig.displayName}" rendered="#{not empty discoveryLoginBean.clientConfig.displayName}" />
					<h:outputText value="#{discoveryLoginBean.clientConfig.name}" rendered="#{empty discoveryLoginBean.clientConfig.displayName}" />
				</b>
			</p:outputPanel>

michael.simon's avatar
michael.simon committed
49
50
			<div><p:messages showDetail="true" /></div>

51
52
			<p:focus conext="baseData" for="filterText" />

michael.simon's avatar
michael.simon committed
53
			<h:panelGrid id="baseData" columns="2" style="margin-top: 8px;" columnClasses="col-width-1,col-width-2">	
michael.simon's avatar
michael.simon committed
54
55
56
57
58
59
	
				<p:outputLabel value="#{messages.federation}:" for="selectFed" />
		        <p:selectOneMenu id="selectFed" value="#{discoveryLoginBean.selectedFederation}"
		        	converter="#{federationConverter}" >
		        	<f:selectItem itemLabel="#{messages.all}" itemValue="#{null}"/>
	            	<f:selectItems value="#{discoveryLoginBean.federationList}" 
michael.simon's avatar
michael.simon committed
60
	            		var="federation" itemLabel="#{federation.name}" itemValue="#{federation}"/>
michael.simon's avatar
michael.simon committed
61
62
63
64
	            	<f:ajax execute="@this" render="idpBox" event="change" />
	            </p:selectOneMenu>
	
				<p:outputLabel value="#{messages.search_filter}:" for="filterText" />
65
				<p:inputText value="#{discoveryLoginBean.filter}" id="filterText" >
michael.simon's avatar
michael.simon committed
66
67
					<f:ajax event="keyup" execute="@this" render="idpBox" />
				</p:inputText>
68
				
michael.simon's avatar
michael.simon committed
69
				<p:outputLabel value="#{messages.home_org}:" for="idpBox" />
michael.simon's avatar
michael.simon committed
70
				<p:selectOneListbox id="idpBox" value="#{discoveryLoginBean.selectedIdp}" scrollHeight="360" style="width:auto;"
michael.simon's avatar
michael.simon committed
71
72
73
74
75
						converter="#{samlIdpMetadataConverter}">
	            	<f:selectItems value="#{discoveryLoginBean.idpList}" 
	            		var="idp" itemLabel="#{idp.displayName == null ? idp.orgName : idp.displayName}" itemValue="#{idp}"/>
					<p:ajax event="dblclick" listener="#{discoveryLoginBean.login}" update=":form" />	            		
				</p:selectOneListbox>
76
77
78

				<h:outputText value="#{messages.store_idp_selection}: " />
				<h:selectBooleanCheckbox value="#{discoveryLoginBean.storeIdpSelection}" />
michael.simon's avatar
michael.simon committed
79
80
81
82
83
84
85
				
			</h:panelGrid>
	
			<p:commandButton id="login" action="#{discoveryLoginBean.login}" value="#{messages.proceed}"
				update=":form" />
		</p:panel>

michael.simon's avatar
michael.simon committed
86
		<p:panel header="OIDC Test" rendered="#{'true'.equalsIgnoreCase(discoveryLoginBean.appConfig.getConfigValue('show_oidc_login'))}" styleClass="full">
bimmel's avatar
bimmel committed
87
			<h:panelGrid id="oidcBaseData" columns="2" style="margin-top: 8px;">
michael.simon's avatar
michael.simon committed
88
				<p:outputLabel value="#{messages.home_org}:" for="oidcBox" />
bimmel's avatar
bimmel committed
89
90
91
92
93
94
95
96
				<p:selectOneListbox id="oidcBox" value="#{discoveryLoginBean.selectedOidcRp}" scrollHeight="120" style="width:300px;"
						converter="#{oidcRpConfigurationConverter}">
	            	<f:selectItems value="#{discoveryLoginBean.oidcRpList}" 
	            		var="rp" itemLabel="#{rp.displayName}" itemValue="#{rp}"/>
					<p:ajax event="dblclick" listener="#{discoveryLoginBean.oidcLogin()}" update=":form" />	            		
				</p:selectOneListbox>
			</h:panelGrid>
				
michael.simon's avatar
michael.simon committed
97
			<p:commandButton id="oidcLogin" action="#{discoveryLoginBean.oidcLogin()}" value="#{messages.proceed}" 
bimmel's avatar
bimmel committed
98
				update=":form"/>
michael.simon's avatar
michael.simon committed
99
		</p:panel>
michael.simon's avatar
michael.simon committed
100
101
102
103
104
105
	</h:form>
	
	</ui:define>
</ui:composition>
</body>
</html>