bare-bones for the access approval page and mockup

pull/59/head
Michael Jett 13 years ago
parent c925a18a04
commit efefdff915

@ -0,0 +1,59 @@
<%@ page import="org.springframework.security.core.AuthenticationException" %>
<%@ page import="org.springframework.security.oauth2.provider.verification.BasicUserApprovalFilter" %>
<%@ page import="org.springframework.security.oauth2.provider.verification.VerificationCodeFilter" %>
<%@ page import="org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter" %>
<%@ taglib prefix="authz" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="o" tagdir="/WEB-INF/tags" %>
<o:header title="approve access"/>
<o:topbar/>
<div class="container">
<div class="content">
<c:if test="${!empty sessionScope.SPRING_SECURITY_LAST_EXCEPTION}">
<div class="alert-message error">
<a href="#" class="close">&times;</a>
<p><strong>Access could not be granted.</strong>
(<%= ((AuthenticationException) session.getAttribute(AbstractAuthenticationProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %>
)</p>
</div>
</c:if>
<c:remove scope="session" var="SPRING_SECURITY_LAST_EXCEPTION"/>
<authz:authorize ifAllGranted="ROLE_USER">
<div class="hero-unit" style="text-align:center">
<h1>Please Confirm!</h1>
<p>I hereby authorize "<c:out value="${client.clientId}"/>" to access my protected resources.</p>
<p>
<form id="confirmationForm" name="confirmationForm"
action="<%=request.getContextPath() + VerificationCodeFilter.DEFAULT_PROCESSING_URL%>"
method="post">
<input name="<%=BasicUserApprovalFilter.DEFAULT_APPROVAL_REQUEST_PARAMETER%>"
value="<%=BasicUserApprovalFilter.DEFAULT_APPROVAL_PARAMETER_VALUE%>" type="hidden"/>
<input name="authorize" value="Authorize" type="submit" class="btn success large"/>
</form>
&nbsp;
<form id="denialForm" name="denialForm"
action="<%=request.getContextPath() + VerificationCodeFilter.DEFAULT_PROCESSING_URL%>"
method="post">
<input name="<%=BasicUserApprovalFilter.DEFAULT_APPROVAL_REQUEST_PARAMETER%>"
value="not_<%=BasicUserApprovalFilter.DEFAULT_APPROVAL_PARAMETER_VALUE%>" type="hidden"/>
<input name="deny" value="Deny" type="submit" class="btn secondary large"/>
</form>
</p>
<a href="#" class="small">learn more</a>
</div>
</authz:authorize>
<o:copyright/>
</div>
</div>
<o:footer/>

@ -0,0 +1,105 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>OpenID Connect</title>
<meta name="description" content="">
<meta name="author" content="">
<!-- Le javascript -->
<script src="http://code.jquery.com/jquery-1.7.min.js"></script>
<script src="../bootstrap/js/bootstrap-modal.js"></script>
<script src="../bootstrap/js/bootstrap-alerts.js"></script>
<script src="../bootstrap/js/bootstrap-twipsy.js"></script>
<script src="../bootstrap/js/bootstrap-popover.js"></script>
<script src="../bootstrap/js/bootstrap-dropdown.js"></script>
<script src="../bootstrap/js/bootstrap-scrollspy.js"></script>
<script src="../bootstrap/js/bootstrap-tabs.js"></script>
<script src="../bootstrap/js/bootstrap-buttons.js"></script>
<script src="../js/tmpl.js"></script>
<script>$(function () {
var ExampleOpenIdClient = {
name:"A name",
redirectURL:"http://myURL.domain",
grantType:["my grant type 1", "my grant type 2"],
scope:["scope 1", "scope 2"],
authority:"my authority",
description:"my description",
refreshTokens:false
};
console.log(tmpl('client_tmpl',ExampleOpenIdClient));
$('#client-table').append(tmpl('client_tmpl',ExampleOpenIdClient));
})</script>
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le styles -->
<link href="../bootstrap/bootstrap.css" rel="stylesheet">
<style type="text/css">
body {
padding-top: 60px;
}
.logo {
background: url("../images/openid_small.png") no-repeat left center;
padding-left: 30px;
}
</style>
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="images/favicon.ico">
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
</head>
<body>
<div class="topbar">
<div class="topbar-inner">
<div class="container-fluid">
<a class="brand" href="#"><span class="logo">OpenID Connect Server</span></a>
<ul class="nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#about">Statistics</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
<p class="pull-right">Logged in as <a href="#">username</a></p>
</div>
</div>
</div>
<div class="container">
<div class="content">
<div class="alert-message error">
<a href="#" class="close">&times;</a>
<p><strong>Oh snap!</strong> Change this and that and <a href="#">try again</a>.</p>
</div>
<div class="hero-unit" style="text-align:center">
<h1>Please Confirm!</h1>
<p>I hereby authorize http://domain.com to access my protected resources.</p>
<p><a class="btn success large">Approve</a>&nbsp;<a class="btn secondary large">Deny</a></p>
<a href="#" class="small">learn more</a>
</div>
<footer>
<p>&copy; Company 2012</p>
</footer>
</div>
</div>
</body>
</html>
Loading…
Cancel
Save