IdentificationPopoverPanel.java 文件源码

java
阅读 25 收藏 0 点赞 0 评论 0

项目:artifact-listener 作者:
@Override
protected void onInitialize() {
    super.onInitialize();

    // Vérification des retours d'auth pac4J
    HttpServletRequest request = ((ServletWebRequest) RequestCycle.get().getRequest()).getContainerRequest();
    Exception exception = (Exception) request.getSession().getAttribute(WebAttributes.AUTHENTICATION_EXCEPTION);
    if (exception != null) {
        if (exception instanceof DisabledException) {
            getSession().error(getString("home.identification.classic.error.userDisabled"));
        } else if (exception instanceof AuthenticationServiceException) {
            LOGGER.error("Authentication failed", exception);
            getSession().error(getString("home.identification.error.badCredentials") + exception.getMessage());
        } else {
            LOGGER.error("An unknown error occurred during the authentication process", exception);
            getSession().error(getString("home.identification.error.unknown"));
        }
        request.getSession().removeAttribute(WebAttributes.AUTHENTICATION_EXCEPTION);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号