ConfluenceAuthenticationProvider.java 文件源码

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

项目:communote-server 作者:
/**
 * {@inheritDoc}
 */
@Override
protected Authentication createSuccessAuthentication(UserDetails details,
        Authentication authentication) {
    if (details == null || authentication == null) {
        return null;
    }
    AbstractAuthenticationToken auth = null;
    if (authentication instanceof UsernamePasswordAuthenticationToken) {
        auth = new UsernamePasswordAuthenticationToken(details,
                authentication.getCredentials(), details.getAuthorities());
    } else if (authentication instanceof ConfluenceAuthenticationToken) {
        auth = new ConfluenceAuthenticationToken(details,
                (String) authentication.getCredentials(), details.getAuthorities());
    }
    if (auth != null) {
        auth.setDetails(authentication.getDetails());
    }
    return auth;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号