-
Notifications
You must be signed in to change notification settings - Fork 5
/
sociallogin.jspx
79 lines (70 loc) · 2.81 KB
/
sociallogin.jspx
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
68
69
70
71
72
73
74
75
76
77
78
<div xmlns:spring="http://www.springframework.org/tags" xmlns:tiles="http://tiles.apache.org/tags-tiles" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:util="urn:jsptagdir:/WEB-INF/tags/util" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
<jsp:directive.page contentType="text/html;charset=UTF-8" />
<jsp:output omit-xml-declaration="yes" />
<tiles:useAttribute name="registeredProviderRoleNamesByProviderName"/>
<tiles:useAttribute name="provider" ignore="true" />
<tiles:useAttribute name="userName" ignore="true" />
<spring:message code="security_login_title" var="title" htmlEscape="false" />
<util:panel id="title" title="${title}">
<c:if test="${not empty param.login_error}">
<div class="errors">
<p>
<spring:message code="security_login_unsuccessful" />
<c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}" />
.
</p>
</div>
</c:if>
<c:if test="${not empty exception}">
<p><c:out value="${exception.message}" /></p>
</c:if>
<c:if test="${empty param.login_error}">
<p>
<c:choose>
<c:when test="${empty provider}">
<spring:message code="security_sociallogin_message" />
</c:when>
<c:otherwise>
<c:if test="${empty userName}">
Please login with <c:out value="${provider}" /> to use this functionality
</c:if>
<c:if test="${not empty userName}">
<c:choose>
<c:when test="${not empty springSocialSecurityRequiredProviders}">
<p>To use this functionality, please first connect your account with the following provider(s) : <c:out value="${springSocialSecurityRequiredProviders} "/></p>
<p>Connect with <c:out value="${provider}" /></p>
</c:when>
<c:otherwise>
Please connect with <c:out value="${provider}" /> to use this functionality
</c:otherwise>
</c:choose>
</c:if>
</c:otherwise>
</c:choose>
</p>
</c:if>
<c:choose>
<c:when test="${empty provider}">
<c:set var="signinOrConnectPath" value="signin" />
</c:when>
<c:otherwise>
<c:set var="signinOrConnectPath" value="connect" />
</c:otherwise>
</c:choose>
<c:forEach var="entry"
items="${registeredProviderRoleNamesByProviderName}">
<p>
<!-- PROVIDER SIGNIN -->
<!-- TODO: Remove hardcoded context path -->
<c:if test="${empty provider or provider eq entry.key}">
<form name="${entry.key}_signin" id="${entry.key}_signin" action="/socialsignin-roo-showcase/${signinOrConnectPath}/${entry.key}" method="POST">
<c:if test="${entry.key eq 'facebook'}">
<input type="hidden" name="scope" value="offline_access" />
</c:if>
<input type="submit" value="${entry.key}" />
</form>
</c:if>
</p>
</c:forEach>
</util:panel>
</div>