authentication in spring boot using graphql

后端 未结 2 1959

I’m working on a spring boot project with GraphQL. I\'m using graphql-java-tools and graphql-spring-boot-starter. I managed to configure security and session management with spr

2条回答
  •  悲&欢浪女
    2021-02-02 18:22

    Even though you need to use permitAll() you can still create reasonable default for your resolver methods using AOP.

    You can create your custom security aspect that will require authentication by default.

    Unsecured methods may be marked for example using annotation.

    See my blog post for details: https://michalgebauer.github.io/spring-graphql-security

提交回复
热议问题