Symfony FOSOAuthServerBundle访问\u令牌生命周期

Symfony FOSOAuthServerBundle访问\u令牌生命周期,symfony,oauth,access-token,Symfony,Oauth,Access Token,如果有人正在研究如何更改FOSOAuthServerBundle的访问令牌生存期(expires\u in),那么以下是如何操作: fos_oauth_server: service: user_provider: fos_user.user_manager options: access_token_lifetime: 20 #will set token life time to 20 seconds 通过这种方式,您还可以更

如果有人正在研究如何更改FOSOAuthServerBundle的访问令牌生存期(expires\u in),那么以下是如何操作:

fos_oauth_server:
    service:
        user_provider: fos_user.user_manager
        options:
            access_token_lifetime: 20 #will set token life time to 20 seconds
通过这种方式,您还可以更改FOSOAuthServerBundle完全使用的OAuth2.0库的其他选项

希望这篇文章能节省一些人的时间;) 享受其他重要任务和改进的美好时光;)
享受

在官方文档中:
请在手动配置访问令牌生命周期后,根据您的环境运行
php应用程序/控制台缓存:clear--env=prod
php应用程序/控制台缓存:clear--env=dev
,以产生效果

谢谢大家!!这正是我要找的,很酷。但是当我发布时,关于这个选项的文档是空的:-)这就是为什么我决定在这里发布:-)无论如何,谢谢分享:-)