[英]How to verify JWT id_token produced by MS Azure AD with C# and .net?
[英]How to verify id token for Line-api? (how to use jwt.net in the same way as java?)
如何使用JWT.Net验证id_token? 这是java中的代码:
JWT.require(
Algorithm.HMAC256(channelSecret))
.withIssuer("https://access.line.me")
.withAudience(channelId)
.withClaim("nonce", nonce)
.build()
.verify(id_token);
有关https://developers.line.me/en/docs/line-login/web/integrate-line-login/的详细信息
请参阅零件: Decoding and validating ID tokens
如何在C#.Net中实现相同的功能? 在nuget上有JWT.Net找不到类似的方法。
我发现了现在如何使用JWT.Net。
decodedJson = new JwtBuilder()
.WithSecret(secret)
.WithAlgorithm(hmacsha256Algorithm)
.MustVerifySignature()
.Decode(idToken);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.