无法向 Keycloak 添加自定义身份验证器

时间:2021-04-14 10:54:56

标签: java authentication keycloak redhat

我必须在 Keycloak 中引入手机号码/OTP 身份验证。我尝试使用从互联网上获得的两个自定义身份验证器,但都不起作用。错误是:

...
case FORMULA:
 if (isUseCashedFormulaValue) {
  //cell.removeFormula();
  //return readCell(cell);
  switch (cell.getCachedFormulaResultType()) {
   case NUMERIC:
    return String.valueOf(cell.getNumericCellValue());
   case STRING:
    return cell.getStringCellValue();
   case BOOLEAN:
    return String.valueOf(cell.getBooleanCellValue());
   case ERROR:
    return "ERROR_" + cell.getErrorCellValue();
  }
 } else {
  return cell.getCellFormula();
 }
...

我使用的自定义验证器来自 RedHat 博客

https://developers.redhat.com/blog/2020/10/23/use-mobile-numbers-for-user-authentication-in-keycloak/

我看到很多用户报告了类似的问题,但没有人能提供解决方案。 有人可以帮我吗?

0 个答案:

没有答案