Skip to content
Snippets Groups Projects
Verified Commit bc03336f authored by Ira ¯\_(ツ)_/¯'s avatar Ira ¯\_(ツ)_/¯
Browse files

Move the constructor to be the first method of the class

parent 6d362ed1
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,11 @@ public class MailPassResource {
private static final String VARIANT = "2b";
private static final SecureRandom random = new SecureRandom();
public MailPassResource(KeycloakSession session, String userName) {
this.session = session;
this.userName = userName;
}
private byte[] generateSalt() {
// https://cheatsheetseries.owasp.org/cheatsheets/Cryptographic_Storage_Cheat_Sheet.html#secure-random-number-generation
final var salt = new byte[SALT_LENGTH];
......@@ -53,11 +58,6 @@ public class MailPassResource {
return true;
}
public MailPassResource(KeycloakSession session, String userName) {
this.session = session;
this.userName = userName;
}
/**
* The custom REST endpoint reachable at {{ base_url }}/realms/{{ realm
* }}/mailpass/auth/compute-password-hash.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment