[英]generate azure ad jwt token and call the thrid party api using those token using spring boot
I registered the app in an azure ad, and I have application id(client id) and directory id (tenant id), and secret key.我在 azure 广告中注册了该应用程序,并且我有应用程序 ID(客户端 ID)和目录 ID(租户 ID)和密钥。
using this need to generate the jwt token in the azure ad and need to validate that token.使用它需要在 azure 广告中生成 jwt 令牌并需要验证该令牌。
once the token generate need to call the third-party API's using that token in spring boot application.一旦令牌生成需要在 spring 引导应用程序中使用该令牌调用第三方 API。
please provide some example请提供一些例子
To achieve the above requirement.达到上述要求。 You can take Reference of this Post to call the third-party Api using the JWT token using spring boot application.您可以参考这篇文章使用 spring 引导应用程序使用 JWT 令牌调用第三方 Api。
In the above, there is tutorial they have built a Spring Boot Application that supports Token based Authentication with JWT. Please refer the section How to configure Spring Security to work with JWT that might be solution of requirement.在上面,有教程他们已经构建了一个 Spring 启动应用程序,它支持使用 JWT 进行基于令牌的身份验证。请参阅如何配置 Spring 安全性以使用 JWT 部分,这可能是需求的解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.