-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
read in user list. Allow password reset with no username validation. …
…All we are missing is the e-mail notification
- Loading branch information
Ben R Alexander
committed
Aug 26, 2014
1 parent
ec56695
commit 29c7037
Showing
13 changed files
with
608 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
// Place your Spring DSL code here | ||
import dport.mgr.AuthenticationFailedEventListener | ||
import dport.mgr.UsernameNotFoundEventListener | ||
beans = { | ||
authenticationFailedEventListener(AuthenticationFailedEventListener) | ||
usernameNotFoundEventListener(UsernameNotFoundEventListener) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title><g:message code="springSecurity.login.title"/></title> | ||
<meta name="layout" content="core"/> | ||
<r:require modules="core"/> | ||
<r:layoutResources/> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<div id="main"> | ||
|
||
<div class="container"> | ||
|
||
<g:if test='${flash.message}'> | ||
<div class="alert alert-danger">${flash.message}</div> | ||
</g:if> | ||
|
||
<div class="row"> | ||
<div class="col-md-8 col-md-offset-2 login-header"> | ||
<p>Please enter a new password</p> | ||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="col-md-6 col-md-offset-3"> | ||
<g:form action='updatePasswordInteractive' method='POST' id='passwordResetForm' class='form form-horizontal cssform' autocomplete='off'> | ||
|
||
<div class="form-group"> | ||
<label class="control-label col-sm-3" id="id_email">Username:</label> | ||
|
||
<div class="col-sm-8"> | ||
<input type='text' class='text_' name='username' id='username' value="${username}" readonly/> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label class="control-label col-sm-3" for="newPassword">New password:</label> | ||
|
||
<div class="col-sm-8"> | ||
<input type='password' class='text_' name='newPassword' id='newPassword'/> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label class="control-label col-sm-3" for="newPassword2">New password (again):</label> | ||
|
||
<div class="col-sm-8"> | ||
<input type='password' class='text_' name='newPassword2' id='newPassword2'/> | ||
</div> | ||
</div> | ||
|
||
<div style="text-align:center; padding-top: 20px;"> | ||
<input class="btn btn-primary btn-lg" type='submit' id="submit" | ||
value='Reset'/> | ||
</div> | ||
|
||
</g:form> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
<script type='text/javascript'> | ||
<!-- | ||
(function() { | ||
$('#oldPassword').focus(); | ||
})(); | ||
// --> | ||
</script> | ||
</body> | ||
</html> |
11 changes: 11 additions & 0 deletions
11
src/groovy/dport/mgr/AuthenticationFailedEventListener.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package dport.mgr | ||
import org.springframework.context.ApplicationListener | ||
import org.springframework.security.authentication.event.AuthenticationFailureBadCredentialsEvent | ||
/** | ||
* Created by balexand on 8/26/2014. | ||
*/ | ||
class AuthenticationFailedEventListener implements ApplicationListener<AuthenticationFailureBadCredentialsEvent > { | ||
void onApplicationEvent(AuthenticationFailureBadCredentialsEvent event) { | ||
println "AuthenticationFailedEventListener fired" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package dport.mgr | ||
|
||
import org.springframework.context.ApplicationListener | ||
import org.springframework.security.core.userdetails.UsernameNotFoundException | ||
|
||
/** | ||
* Created by balexand on 8/26/2014. | ||
*/ | ||
class UsernameNotFoundEventListener implements ApplicationListener<UsernameNotFoundException> { | ||
void onApplicationEvent(UsernameNotFoundException event) { | ||
println "UsernameNotFoundEventListener fired" | ||
} | ||
} |
Oops, something went wrong.