-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpets.xhtml
67 lines (57 loc) · 2.99 KB
/
pets.xhtml
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- you have to know about JSF facelets to understand what's happenning here really -->
<!-- this root tag says, "for this page use /WEB-INF/incl/layout/template.xhtml as reusable template -->
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
template="/WEB-INF/incl/layout/template.xhtml">
<!-- This makes a call to this method:
https://github.com/GluuFederation/oxAuth/blob/version_3.1.4/Server/src/main/java/org/xdi/oxauth/auth/Authenticator.java#L524-L524
-->
<f:metadata>
<f:viewAction action="#{authenticator.prepareAuthenticationForStep}" if="#{not identity.loggedIn}"/>
</f:metadata>
<!-- defines a fragment called head - it's used to generate the HTML HEAD of resulting markup -->
<ui:define name="head">
<meta name="description" content="Gluu Inc." />
<!-- Here we use # {...} which are JSF EL expressions, they bind server values to this markup -->
<link href="#{oxAuthConfigurationService.getCssLocation()}/bootstrap.min.css" rel="stylesheet"/>
<link rel="stylesheet" href="#{oxAuthConfigurationService.getCssLocation()}/style.css"/>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600" rel="stylesheet"/>
</ui:define>
<ui:define name="body">
<!-- this is copy pasted from somewhere ... -->
<header class="bs-docs-nav navbar navbar-static-top" id="top">
<div class="container">
<div class="navbar-header">
<a target="_blank" class="navbar-brand">
<img src="../img/logo.png" alt="logo" /></a>
</div>
</div>
</header>
<h:form id="PetForm">
<!-- these divs were stolen from some other page... HTML+CSS so annoying -->
<div class="bs-docs-section">
<div class="container">
<div class="step_bx">
<h2>Pet login</h2>
<p>Enter the name of your pet:</p>
<!-- This form field is referenced in authenticate method of script -->
<input class="form-control" id="PetForm:petName" name="PetForm:petName"
type="text" autocomplete="off" />
<!-- commandButton component makes the form to be submitted: it triggers this Java method to
https://github.com/GluuFederation/oxAuth/blob/version_3.1.4/Server/src/main/java/org/xdi/oxauth/auth/Authenticator.java#L117
which in turn ends up calling the authenticate method in script.
Usage of msgs[ ... ] is employed to lookup predefined UI labels you can find at
https://github.com/GluuFederation/oxAuth/blob/version_3.1.4/Server/src/main/resources/oxauth.properties
-->
<h:commandButton class="btn btn-done" value="#{msgs['login.login']}"
action="#{authenticator.authenticate}" />
</div>
</div>
</div>
</h:form>
</ui:define>
</ui:composition>