⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 openidauthentication.jsp

📁 开源的OpenId的一个java实现
💻 JSP
字号:
<%@ page session="true"%>
<%@ page
	import="java.util.List,org.openid4java.message.AuthSuccess,org.openid4java.server.InMemoryServerAssociationStore,org.openid4java.message.DirectError,org.openid4java.message.Message,org.openid4java.message.ParameterList,org.openid4java.discovery.Identifier,org.openid4java.discovery.DiscoveryInformation,org.openid4java.message.ax.FetchRequest,org.openid4java.message.ax.FetchResponse,org.openid4java.message.ax.AxMessage,org.openid4java.message.*,org.openid4java.OpenIDException,java.util.List,java.io.IOException,javax.servlet.http.HttpSession,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,org.openid4java.server.ServerManager,org.openid4java.consumer.InMemoryConsumerAssociationStore,org.openid4java.consumer.VerificationResult"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>WSO2 Identity Solution | Management Console</title>
<link type="text/css" rel="stylesheet" href="css/styles.css" />

<script type="text/javascript" language="JavaScript">

        function setRememberMe() {
            var val = document.getElementById("chkRemember").checked;
            var remMe = document.getElementById("remember");

            if (val) {
                remMe.value = "true";
            } else {
                remMe.value = "false";
            }
        }

    </script>

</head>
<body>

<div class="page"><!-- START Header  --> <s:include
	value="header.jsp" /> <!-- END Header --> <%
 			ParameterList requestp = (ParameterList) session
 			.getAttribute("parameterlist");
 	String openidrealm = requestp.hasParameter("openid.realm") ? requestp
 			.getParameterValue("openid.realm")
 			: null;
 	String openidreturnto = requestp.hasParameter("openid.return_to") ? requestp
 			.getParameterValue("openid.return_to")
 			: null;
 	String openidclaimedid = requestp.hasParameter("openid.claimed_id") ? requestp
 			.getParameterValue("openid.claimed_id")
 			: null;
 	String openididentity = requestp.hasParameter("openid.identity") ? requestp
 			.getParameterValue("openid.identity")
 			: null;
 	String site = (String) (openidrealm == null ? openidreturnto
 			: openidrealm);
 %>

<table cellpadding="0" cellspacing="0" border="0" style="width: 100%;">
	<tr>
		<td class="right-back"></td>
		<td class="content" valign="top">
		<table cellpadding="0" cellspacing="0" border="0" style="width: 100%;">
			<tr>
				<td>
				<h1>WSO2 Identity Provider</h1>
				</td>
				<td align="right" valign="top"><img
					src="images/wso2-identity-content-rounded.jpg" align="top" /></td>
			</tr>
		</table>

		<s:iterator value="errorMessages">
			<div class="error-message"><s:property /></div>
		</s:iterator> <s:iterator value="infoMessages">
			<div class="info-message"><s:property /></div>
		</s:iterator>
		<table cellpadding="0" cellspacing="10" border="0"
			class="login-header">
			<tr>
				<td><s:form action="/OpenIDAuthVerification.action"
					theme="simple" method="POST">
					<input type="hidden" id="remember" name="remember" value="false" />
					<div class="errors"><s:actionerror /> <s:fielderror /></div>
					<%
					if (openidreturnto != null && openididentity != null) {
					%>
					<table>
						<tr>
							<td><strong>Please sign in to authenticate to <%=openidreturnto%>
							as <%=openididentity%>.</strong></td>
						</tr>
						<s:if test="%{multiFactorPhysicalAuthentication}">
							<tr>
								<td><strong>Sorry, we do not support
								Multi-Factor-Physical Authentication</strong></td>
							</tr>
						</s:if>
					</table>
					<%
					}
					%>
					<table>
						<tr>
							<s:if test="%{!(multiFactorPhysicalAuthentication)}">
								<s:if test="%{!(phishingResistanceAuthentication || multiFactorAuthentication)}">
									<td width="40%">
									<table cellpadding="0" cellspacing="10" border="0"
										class="form-table">
										<tr>
											<td colspan="2"><strong>Login with your OpenID
											password</strong></td>
										</tr>
										<tr>
											<td width="10%">Password</td>
											<td><input type="password" name="password"></td>
										</tr>
										<tr>
											<td align="left" colspan="2"><input type="checkbox"
												id="chkRemember" onclick="setRememberMe();">Remember
											me on this computer</td>
										</tr>
										<tr>
											<td colspan="2"><s:submit value="Login" align="left"
												cssClass="button" /></td>
										</tr>
									</table>
									</td>
								</s:if>

								<s:if
									test="%{!(multiFactorAuthenticationWithUsernamePassword || phishingResistanceAuthentication || multiFactorAuthentication)}">
									<td><img src="images/line-sep.png" height="150" width="2" /></td>
									<td valign="middle" align="center" width="5%"><strong>OR</strong></td>
									<td><img src="images/line-sep.png" height="150" width="2" /></td>
								</s:if>

								<s:if test="%{!(multiFactorAuthenticationWithUsernamePassword)}">
									<td>
									<table cellpadding="40">
										<tr>
											<td><strong>Login with your self-issued
											Information Card</strong>
											<div><a href="OpenIDSelfIssuedLogin.action"
												title="Login with your Information Card"><img
												src="images/infocard_114x80.png" align="left"
												style="margin-right: 10px;" border="0" /></a> you can only
											login with a personal information card that you have already
											registered. If you have not registered a personal information
											card please first login with your username and password and
											register a card.</div>
											</td>
										</tr>
									</table>
									</td>
								</s:if>
							</s:if>
						</tr>
					</table>
				</s:form></td>
		</table>


		<br />
		<br />
		<br />
		<br />
		</td>
	</tr>
</table>

</div>
<!-- Include footer -->
<s:include value="footer.jsp" />
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -