美文网首页
UsernamePasswordAuthenticationTo

UsernamePasswordAuthenticationTo

作者: zjkdifvpwlkqumn | 来源:发表于2020-07-28 14:13 被阅读0次

    UsernamePasswordAuthenticationToken
    里面有UserDetails【principal】,credentials,authorities

    UserDetails-里面有账号密码

    UsernamePasswordAuthenticationToken authentication =
    new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities());

    authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
    WebAuthenticationDetailsSource是干啥的?

    相关文章

      网友评论

          本文标题:UsernamePasswordAuthenticationTo

          本文链接:https://www.haomeiwen.com/subject/nmefrktx.html