added custom login form, changed footer to only optionally load app
parent
8d4e046408
commit
dc7aac12f9
|
@ -1,3 +1,3 @@
|
|||
<footer>
|
||||
<footer class="clearfix">
|
||||
<p>© Company 2012</p>
|
||||
</footer>
|
|
@ -1,3 +1,6 @@
|
|||
<%@attribute name="loadapp" required="false" type="java.lang.Boolean" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!-- Le javascript
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
|
@ -6,7 +9,8 @@
|
|||
<script type="text/javascript" src="resources/js/underscore-min.js"></script>
|
||||
<script type="text/javascript" src="resources/js/backbone-min.js"></script>
|
||||
<script type="text/javascript" src="resources/js/backbone.validations.js"></script>
|
||||
<c:if test="${loadapp == null || loadapp == Boolean.TRUE}">
|
||||
<script type="text/javascript" src="resources/js/app.js"></script>
|
||||
|
||||
</c:if>
|
||||
</body>
|
||||
</html>
|
|
@ -6,11 +6,13 @@
|
|||
xmlns:security="http://www.springframework.org/schema/security"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xmlns:util="http://www.springframework.org/schema/util"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
||||
http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2.xsd
|
||||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2.xsd
|
||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
|
||||
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd
|
||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd">
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
|
||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd">
|
||||
|
||||
|
||||
<security:global-method-security pre-post-annotations="enabled" proxy-target-class="true" authentication-manager-ref="authenticationManager">
|
||||
|
@ -36,7 +38,10 @@
|
|||
</security:authentication-provider>
|
||||
</security:authentication-manager>
|
||||
|
||||
<mvc:view-controller path="/login" view-name="login" />
|
||||
|
||||
<security:http auto-config="true" disable-url-rewriting="true" use-expressions="true"> <!-- authentication-manager-ref="springSecurityAuthenticationManager" -->
|
||||
<security:form-login login-page="/login" />
|
||||
<security:intercept-url pattern="/oauth/**" access="hasRole('ROLE_USER')" />
|
||||
<security:intercept-url pattern="/**" access="permitAll" />
|
||||
<security:custom-filter ref="resourceServerFilter" before="PRE_AUTH_FILTER" />
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
<%@ taglib prefix="authz" uri="http://www.springframework.org/security/tags" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="o" tagdir="/WEB-INF/tags" %>
|
||||
<o:header title="Log In"/>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
$().ready(function() {
|
||||
$('#j_username').focus();
|
||||
});
|
||||
|
||||
//-->
|
||||
</script>
|
||||
<o:topbar/>
|
||||
<div class="container">
|
||||
|
||||
<h1>Login with Username and Password</h1>
|
||||
|
||||
<!-- TODO: this is an ugly form but it gets the job done -->
|
||||
|
||||
<form action="<%=request.getContextPath()%>/j_spring_security_check" method="POST" class="well">
|
||||
<fieldset>
|
||||
<div class="input-prepend"><span class="add-on">Username:</span><input name="j_username" id="j_username" value="" type="text"></div>
|
||||
<div class="input-prepend"><span class="add-on">Password:</span><input name="j_password" id="j_password" type="password"></div>
|
||||
<div class="form-actions"><input name="submit" value="Login" class="btn" type="submit"></div>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<o:copyright/>
|
||||
</div>
|
||||
<o:footer loadapp="false"/>
|
|
@ -5,7 +5,7 @@
|
|||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="o" tagdir="/WEB-INF/tags" %>
|
||||
|
||||
<o:header title="approve access"/>
|
||||
<o:header title="Approve Access"/>
|
||||
<o:topbar/>
|
||||
<div class="container">
|
||||
<% if (session.getAttribute(AbstractAuthenticationProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY) != null && !(session.getAttribute(AbstractAuthenticationProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY) instanceof UnapprovedClientAuthenticationException)) { %>
|
||||
|
@ -98,4 +98,4 @@
|
|||
<o:copyright/>
|
||||
</div>
|
||||
</div>
|
||||
<o:footer/>
|
||||
<o:footer loadapp="false"/>
|
Loading…
Reference in New Issue