decryptor = new AESDecryptor(rsaKey);
} catch (AESDecryptorInitializationException e) {
e.printStackTrace();
}
Collection<String> allowedUserTypes = Utils.collection("admin", "rengastaja");
LintuvaaraAuthenticationUtil authUtil = new LintuvaaraAuthenticationUtil(decryptor, "pistelaskenta", allowedUserTypes);
String key = "these you get";
String iv = "as a parameter";
String model = "from the user";
AuthenticationResult result = authUtil.check(key, iv, model);
if (result.success()) {
// do something...
result.getUsermodel().get("login_id");
} else {
// do something else