如何为 uaa(或网关?)设置永不过期的刷新令牌
How to set a never expired refresh token for uaa (or gateway?)
创建了一个网关来服务restfulapi,它不依赖cookie,现在想配置一个永不过期的刷新令牌,这样移动应用程序用户就不需要输入username/password 重复。
在 application-xxx.yml 中找到 refresh-token-validity-in-seconds-for-remember-me 参数,开发配置文件设置为 7 天,如何设置永不过期的刷新令牌?
因为它是一个整数,所以您可以使用 Integer.MAX_VALUE
,即 2147483647 秒,大约 68 年。
我不确定要配置的属性是否与 "remember me" 功能相关。
看看UaaConfiguration
和UaaProperties
类,我觉得属性名字应该是uaa.webClientConfiguration.accessTokenValidityInSeconds
或者uaa.web-client-configuration.access-token-validity-in-seconds
如果您更喜欢破折号符号。
我还没有测试过。
创建了一个网关来服务restfulapi,它不依赖cookie,现在想配置一个永不过期的刷新令牌,这样移动应用程序用户就不需要输入username/password 重复。
在 application-xxx.yml 中找到 refresh-token-validity-in-seconds-for-remember-me 参数,开发配置文件设置为 7 天,如何设置永不过期的刷新令牌?
因为它是一个整数,所以您可以使用 Integer.MAX_VALUE
,即 2147483647 秒,大约 68 年。
我不确定要配置的属性是否与 "remember me" 功能相关。
看看UaaConfiguration
和UaaProperties
类,我觉得属性名字应该是uaa.webClientConfiguration.accessTokenValidityInSeconds
或者uaa.web-client-configuration.access-token-validity-in-seconds
如果您更喜欢破折号符号。
我还没有测试过。