fix redirection error

This commit is contained in:
DOHA 2015-04-02 13:36:05 +02:00
parent 2ebf9bea07
commit 0e2451c30d
3 changed files with 12 additions and 13 deletions

View File

@ -31,17 +31,17 @@ public class SecSecurityConfig extends WebSecurityConfigurerAdapter {
}
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
protected void configure(final AuthenticationManagerBuilder auth) throws Exception {
auth.authenticationProvider(authProvider());
}
@Override
public void configure(WebSecurity web) throws Exception {
public void configure(final WebSecurity web) throws Exception {
web.ignoring().antMatchers("/resources/**");
}
@Override
protected void configure(HttpSecurity http) throws Exception {
protected void configure(final HttpSecurity http) throws Exception {
// @formatter:off
http
.csrf().disable()
@ -49,7 +49,7 @@ public class SecSecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/j_spring_security_check*","/login*", "/logout*", "/signin/**", "/signup/**",
"/user/registration*", "/regitrationConfirm*", "/expiredAccount*", "/registration*",
"/badUser*", "/user/resendRegistrationToken*" ,"/forgetPassword*", "/user/resetPassword*",
"/user/changePassword*", "/emailError*", "/resources/**","/old/user/registration*").permitAll()
"/user/changePassword*", "/emailError*", "/resources/**","/old/user/registration*","/successRegister*").permitAll()
.antMatchers("/invalidSession*").anonymous()
.anyRequest().authenticated()
.and()
@ -80,7 +80,7 @@ public class SecSecurityConfig extends WebSecurityConfigurerAdapter {
@Bean
public DaoAuthenticationProvider authProvider() {
DaoAuthenticationProvider authProvider = new DaoAuthenticationProvider();
final DaoAuthenticationProvider authProvider = new DaoAuthenticationProvider();
authProvider.setUserDetailsService(userDetailsService);
authProvider.setPasswordEncoder(encoder());
return authProvider;

View File

@ -66,7 +66,7 @@ color:#000;
$(document).ready(function () {
options = {
common: {minChar:8},
ui: {showVerdictsInsideProgressBar:true}
ui: {showVerdictsInsideProgressBar:true,showErrors:true}
};
$('#password').pwstrength(options);
});
@ -74,6 +74,7 @@ $(document).ready(function () {
function register(){
event.preventDefault();
$(".alert").html("").hide();
$(".error-list").html("");
if($("#password").val() != $("#matchPassword").val()){
$("#globalError").show().html("Password mismatch");
return;

View File

@ -9,19 +9,17 @@
<html>
<head>
<link href="<c:url value="/resources/bootstrap.css" />" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title><spring:message code="label.pages.home.title"></spring:message></title>
</head>
<body>
<div class="container">
<div class="span12">
<div id="success">
<div class="container">
<h1 class="alert alert-success">
<spring:message code="message.regSucc"></spring:message>
</div>
<a href="<c:url value="login.html" />"><spring:message
</h1>
<a href="<c:url value="/login.html" />"><spring:message
code="label.login"></spring:message></a>
</div>
</div>
</body>
</html>