forked from External/mage
Implement a password reset flow.
This commit is contained in:
parent
23d47be04c
commit
746d034461
14 changed files with 900 additions and 37 deletions
|
|
@ -14,7 +14,7 @@ import org.apache.shiro.crypto.hash.Hash;
|
|||
@DatabaseTable(tableName = "authorized_user")
|
||||
public class AuthorizedUser {
|
||||
|
||||
@DatabaseField(indexName = "name_index")
|
||||
@DatabaseField(indexName = "name_index", unique = true)
|
||||
protected String name;
|
||||
|
||||
@DatabaseField
|
||||
|
|
@ -29,7 +29,7 @@ public class AuthorizedUser {
|
|||
@DatabaseField
|
||||
protected int hashIterations;
|
||||
|
||||
@DatabaseField
|
||||
@DatabaseField(indexName = "email_index", unique = true)
|
||||
protected String email;
|
||||
|
||||
public AuthorizedUser() {
|
||||
|
|
@ -53,4 +53,8 @@ public class AuthorizedUser {
|
|||
ByteSource.Util.bytes(Base64.decode(this.salt)), "");
|
||||
return matcher.doCredentialsMatch(token, info);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue