gpt4 book ai didi

java - OLTU 能否提供 JWT 作为访问 token

转载 作者:太空宇宙 更新时间:2023-11-04 12:44:12 24 4
gpt4 key购买 nike

OLTU 在其有限的文档中提供了一个基于生成的 UUID 提供访问 token 的示例。请参阅here under Token Endpoint

它还有一个使用 JWT(Java Web token )进行服务器到服务器授权的示例 here ,但仅作为授权请求中的不记名 token

现在,通常使用 JWT 作为访问 token 本身(节省不必要的授权服务器访问)

OLTU 没有提供开箱即用的功能吗?实现自定义解决方案似乎很容易,但我希望有一个基于 JWT 的 ValueGenerator interface 实现。以便代币发行者标准执行,OAuthIssuerImpl可以生成一个。

有人用 OLTU 这样做吗?

最佳答案

问题是,OAuth 的规范并不强制使用 JWT,因此 Oltu 的实现尊重规范并力求尽可能合规,使用不包含任何超出规范信息的随机字符串。

来自spec :

Access tokens can have different formats, structures, and methods ofutilization (e.g., cryptographic properties) based on the resourceserver security requirements. Access token attributes and themethods used to access protected resources are beyond the scope ofthis specification

关于java - OLTU 能否提供 JWT 作为访问 token ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36506555/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com