jiobanma
V2EX  ›  Java

springboot+graphql 的项目,如何整合 jwt 使用

  •  
  •   jiobanma ·
    banmajio · Oct 9, 2020 · 1922 views
    This topic created in 2067 days ago, the information mentioned may be changed or developed.

    如题,最近做一个 springboot 整合 graphql 的项目。现在的查询流程是,发起请求,graphql 的服务会自己对请求进行拦截 然后直接进入到 dataFecher 中进行数据处理,而这拦截请求这部分并不是我自己去写的,都是 jar 包里 graphql 的服务做的。也就导致了这个项目并没有像 restful 一样所谓的 controller 层,可以做些拦截请求的操作。 像之前 retsful 的服务,发起一个请求是会携带 token 的,拦截到请求后解析 token 信息当做条件使用。但是因为上述原因,不知道换成 graphql 服务后该如何处理 token 部分的东西。

    1 replies    2020-10-09 18:51:05 +08:00
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1217 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 23:47 · PVG 07:47 · LAX 16:47 · JFK 19:47
    ♥ Do have faith in what you're doing.