Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google app engine Google云端点使用App Engine Flexible(Node.js)自定义身份验证_Google App Engine_Google Cloud Platform_Google Cloud Endpoints - Fatal编程技术网

Google app engine Google云端点使用App Engine Flexible(Node.js)自定义身份验证

Google app engine Google云端点使用App Engine Flexible(Node.js)自定义身份验证,google-app-engine,google-cloud-platform,google-cloud-endpoints,Google App Engine,Google Cloud Platform,Google Cloud Endpoints,Google Cloud Endpoints文档为可扩展服务代理配置文件中的自定义安全定义提供了此规范: securityDefinitions: your_custom_auth_id: authorizationUrl: "" flow: "implicit" type: "oauth2" # The value below should be unique x-google-issuer: "issue

Google Cloud Endpoints文档为可扩展服务代理配置文件中的自定义安全定义提供了此规范:

securityDefinitions:
    your_custom_auth_id:
        authorizationUrl: ""
        flow: "implicit"
        type: "oauth2"
        # The value below should be unique
        x-google-issuer: "issuer of the token"
        x-google-jwks_uri: "url to the public key"
        # Optional. Replace YOUR-CLIENT-ID with your client ID
        x-google-audiences: "YOUR-CLIENT-ID"

对于AppEngineFlexible,关于如何实现这一点的文档非常少。有没有人举过一个如何设置的例子,或者他们能证明这是可能的?特别是,authorizationUrl的接口是什么?我们是否可以放置授权服务的URL(该服务提供由可扩展服务代理验证的JWT令牌),以便如果令牌在authorizationURL中无效,端点将重定向到它?

您是正确的。”authorizationUrl'是一个指向客户端用于检索实际JWT(JSON Web令牌)的

一旦客户端在登录后从您的应用程序引擎应用程序检索到JWT,他们就可以使用它来授权他们对您的云端点API的请求


您的Node.js应用程序引擎应用程序将使用任意语言生成JWT(多种语言)

要生成令牌,您需要提供标准的“JWT”和哈希头,添加特定的用户对象JSON负载(因为该令牌对于该特定用户应该是唯一的),以及您的密钥/公钥

JWT库还应在生成时自动提供所需的密钥,只需确保您在您的as“x-google-issuer”和“x-google-jwks_uri”中提供库使用的颁发者和您的密钥/公钥即可



您可以按照了解有关如何生成和使用JWT的更多信息。您还可以按照特定的方法来处理JWT

如果我们没有像auth0这样的提供者呢?我正在我的Android应用程序的spring boot应用程序中使用auth 2实现JWT。对于身份验证,我的Android应用程序将使用他们的电话号码和密码。我没有找到一个例子来描述如何做。