我有相同的错误此.就我而言,当应用尝试通过Google Cloud Client API上传文件时,就会发生这种情况.
POST https://www.googleapis.com/oauth2/v4/token
400 Bad Request
Invalid JWT: Token must be a short-lived token and in a reasonable timeframe
Run Code Online (Sandbox Code Playgroud)
我如何加载令牌是读取服务帐户json文件,并将其附加到CURLOPT_HTTPHEADERPHP中.它确实在过去一个月内正常运行,因此我猜测Google改变了授权方式.
谁有人面对并解决了这个问题?
我想明白之间的差别grant_type=client_credentials,并grant_type=password在Authentication或OAuth2 Flow概念.我关注以下网站:
我相信grant_type=password在not secure这样只要使用gran_type的JavaScript开发.但我还是有些人可以帮助理解这个概念.
我还观察到,grant_type=client_credentials不提供" refresh_token",它只是提供了access_token 其中的grant_type=password同时提供了access_token和refresh_token.
希望得到详细的解释.我正在使用WSO2 API ManagerOAuth2进行应用程序开发