【发布时间】:2016-10-06 15:36:36
【问题描述】:
我尝试在 auth0 集成中使用 google 端点身份验证。
我不确定我该怎么做,我使用端点文档,但这并不完整。 当我部署它时它不起作用。
感谢您的帮助
这是我的招摇文件:
swagger: "2.0"
info:
description: "A simple Google Cloud Endpoints API example."
title: "Endpoints Example"
version: "1.0.0"
host: "xxx.appspot.com"
basePath: "/"
consumes:
- "application/json"
produces:
- "application/json"
schemes:
- "https"
paths:
"/echo":
get:
description: "Echo back a given message."
operationId: "echo"
produces:
- "application/json"
responses:
200:
description: "Echo"
schema:
$ref: "#/definitions/echoMessage"
security:
- auth0_jwk: []
definitions:
echoMessage:
properties:
message:
type: "string"
authInfoResponse:
properties:
id:
type: "string"
email:
type: "string"
# This section requires all requests to any path to require an API key.
security:
- auth0_jwk: []
securityDefinitions:
# This section configures basic authentication with an API key.
api_key:
type: "apiKey"
name: "key"
in: "query"
# This section configures authentication using Google API Service Accounts
# to sign a json web token. This is mostly used for server-to-server
# communication.
auth0_jwk:
# Update YOUR-ACCOUNT-NAME with your Auth0 account name.
authorizationUrl: "https://xxx.auth0.com/authorize"
flow: "implicit"
type: "oauth2"
x-issuer: "https://xxx.auth0.com/"
# Update this with your service account's email address.
x-jwks_uri: "https://xxx.auth0.com/.well-known/jwks.json"
【问题讨论】:
-
您得到的确切错误是什么?您正在关注哪个文档/教程?
-
我没有收到任何错误,唯一的消息来自命令行并显示“/echo 路径不需要 apikey”。部署时我可以调用回显路径而不会出错。我遵循谷歌文档的端点。
-
您期望发生什么?什么不工作?你用的是哪个教程?
标签: google-app-engine google-cloud-endpoints swagger-2.0 auth0