Skip to content

Commit 6e2b196

Browse files
author
rcsoyer
committed
passwords can be updated
1 parent 2edf67a commit 6e2b196

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • src/main/java/org/acme/authorization_server/domain/entity

src/main/java/org/acme/authorization_server/domain/entity/User.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class User extends BaseAuditEntity
4747

4848
public User(final String username, final String password) {
4949
this.username = deleteWhitespace(username);
50-
this.password = deleteWhitespace(password);
50+
setPassword(password);
5151
this.enabled = true;
5252
}
5353

@@ -84,4 +84,8 @@ public Collection<? extends GrantedAuthority> getAuthorities() {
8484
public void eraseCredentials() {
8585
password = null;
8686
}
87+
88+
public void setPassword(final String password) {
89+
this.password = deleteWhitespace(password);
90+
}
8791
}

0 commit comments

Comments
 (0)