Skip to content

rop service中无法获取spring security oauth2 的Authentication对象 #15

Description

@melin

使用spring security oauth2 认证,OAuth2AuthenticationProcessingFilter 通过access_token获取到Authentication对象,设置到SecurityContextHolder.getContext().setAuthentication(authResult);中。
但AnnotationServletServiceRouter是异步方式执行service method,不在同一个线程中。System.out.println("auth = " + SecurityContextHolder.getContext().getAuthentication());
获取为空。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions