Oauth 2.0 FOSOAuthServerBundle+;HWIOAuthBundle一小时后超时401

Oauth 2.0 FOSOAuthServerBundle+;HWIOAuthBundle一小时后超时401,oauth-2.0,bundle,http-status-code-401,symfony-2.3,hwioauthbundle,Oauth 2.0,Bundle,Http Status Code 401,Symfony 2.3,Hwioauthbundle,我是用户HWIOAuthBundle(我们称之为MyClient),使用FOSOAuthServerBundle(我们称之为MyServer)连接到Symfony 2.3.2 OAuth 2服务器。我能够连接、登录并执行我需要的请求,但一个小时后我一直从“MyServer”启动(401错误)。关于这个问题,我读了很多书,但似乎找不到解决办法 我是OAuth新手,但我相信我使用的访问令牌在一小时后过期 我想知道是否有一种方法可以配置两台机器使用刷新令牌(2年后到期)在到期时“刷新”我的访问令牌 我

我是用户HWIOAuthBundle(我们称之为MyClient),使用FOSOAuthServerBundle(我们称之为MyServer)连接到Symfony 2.3.2 OAuth 2服务器。我能够连接、登录并执行我需要的请求,但一个小时后我一直从“MyServer”启动(401错误)。关于这个问题,我读了很多书,但似乎找不到解决办法

我是OAuth新手,但我相信我使用的访问令牌在一小时后过期

我想知道是否有一种方法可以配置两台机器使用刷新令牌(2年后到期)在到期时“刷新”我的访问令牌

我一直找不到一个如何做到这一点的例子。任何帮助都会很好


干杯

我在使用谷歌登录进行身份验证时遇到了与HWIOAuthBundle相同的问题。最后我找到了如何请求脱机访问。在config.yml中,将选项
access\u type
设置为
offline

hwi_oauth:
    firewall_name: main
    fosub:
        properties:
            google: googleId
    connect:
        account_connector: acme.security.provider.user
    resource_owners:
        google:
            type:                  google
            client_id:            <my_id>
            client_secret:     <my_secret>
            scope:               "https://www.googleapis.com/auth/userinfo.email    https://www.googleapis.com/auth/userinfo.profile     https://www.googleapis.com/auth/analytics.readonly"
            options:
                access_type:     offline
hwi_oauth:
防火墙名称:main
fosub:
特性:
谷歌:谷歌ID
连接:
帐户连接器:acme.security.provider.user
资源所有者:
谷歌:
类型:谷歌
客户识别码:
客户机密:
范围:“https://www.googleapis.com/auth/userinfo.email    https://www.googleapis.com/auth/userinfo.profile     https://www.googleapis.com/auth/analytics.readonly"
选项:
访问类型:脱机
看更多