Api gateway get item dynamodb configuration - amazon-dynamodb

Hi i need get an item from dynamodb through api gateway and i configure the resources like this:
i configure the integration method like the next picture:
and the mapping template is like this:
but when i test apigateway launch this error
Execution failed due to configuration error:
No match for output mapping and no default output mapping configured.
Endpoint Response Status Code: 200
Gateway response type: API_CONFIGURATION_ERROR with status code: 500

I followed these two tutorials and performed get on my dynamoDB table.
My table has primary key name "pk".
Tutorials: Video & Blog
If i write my dynamo request body like yours it does not fetch any record
{
"TableName": "apiG",
"Key": {
"pk": {
"S": "key1"
}
}
}
But if I form my request like
{
"TableName": "apiG",
"PrimaryKey": "pk",
"KeyConditionExpression": "pk = :v1",
"ExpressionAttributeValues": {
":v1": {
"S": "key1"
}
}
}
I get the desired response from dynamoDB.
Your error looks like you have some mix up in your integration response and method response. In the simplest form, keep your method response as default i.e. "HTTP Status: 200 Models: application/json => Empty" and leave your integration response as API Gateway console creates it for you.
This will make sure your DynamoDB output is sent without modification to your browser/output.
I transformed my dynamo output using following mapping template in integration response.
#set($inputRoot = $input.path('$'))
{
"content": [
#foreach($elem in $inputRoot.Items) {
"key": "$elem.pk.S",
"value": "$elem.pv.S"
}#if($foreach.hasNext),#end
#end
]
}
and it produced following output.
{
"content": [
{
"key": "key1",
"value": "val1"
}
]
}
P.S. i had a dynamo table named 'apiG' with primaryKey 'pk' and following the exported swagger from my experiment. Hope it helps.
openapi: "3.0.1"
info:
title: "dynamoProxy"
version: "2020-05-01T06:45:38Z"
servers:
- url: "https://aaaaaaaaaa.execute-api.us-east-2.amazonaws.com/{basePath}"
variables:
basePath:
default: "/test"
paths:
/db:
get:
responses:
200:
description: "200 response"
content:
application/json:
schema:
$ref: "#/components/schemas/Empty"
x-amazon-apigateway-integration:
credentials: "arn:aws:iam::111111111111:role/apiGddbRole"
uri: "arn:aws:apigateway:us-east-2:dynamodb:action/Query"
responses:
default:
statusCode: "200"
responseTemplates:
application/json: "#set($inputRoot = $input.path('$'))\n{\n \"content\"\
: [\n #foreach($elem in $inputRoot.Items) {\n \"\
key\": \"$elem.pk.S\",\n \"value\": \"$elem.pv.S\"\n \
\ }#if($foreach.hasNext),#end\n\t#end\n ]\n}"
passthroughBehavior: "when_no_templates"
httpMethod: "POST"
requestTemplates:
application/json: "{\n \"TableName\": \"apiG\",\n \"PrimaryKey\":\
\ \"pk\",\n \"KeyConditionExpression\": \"pk = :v1\",\n \"ExpressionAttributeValues\"\
: {\n \":v1\": {\n \"S\": \"key1\"\n }\n }\n\
}"
type: "aws"
components:
schemas:
Empty:
title: "Empty Schema"
type: "object"
Cheers!

Related

Firestore RESTful API Query only returns readTime as payload

I am running the following POSTrequest (GET won't work, if anyone was trying and landed here):
URL: https://firestore.googleapis.com/v1/projects/{{ firebaseProjectID }}/databases/(default)/documents:runQuery
The JSON payload I send:
{
"structuredQuery": {
"from": [
{
"collectionId": "items"
}
],
"where": {
"fieldFilter": {
"field": {
"fieldPath": "inStock"
},
"op": "EQUAL",
"value": {
"booleanValue": true
}
}
}
}
}
I receive the following in return:
[
{
"readTime": "2020-04-19T19:38:00.808564Z"
}
]
Why do I receive not a list of documents? I certainly have matching documents.
I should receive all fields given that I entered no list of fields:
https://firebase.google.com/docs/firestore/reference/rest/v1/StructuredQuery#Projection
Posting as Community Wiki, due to the talk that occurred in the comments of the question.
As discussed in the comments, between #RenaudTarnec and #Spurious, it seems that the problem was related to the path in the URL. Once it was corrected - might be related to the "allDescendants": true, but it should not - the call worked and returned the values as expected.

How to describe request body properly using OpenAPI and API Platform?

I am struggling getting the right definition for the request body used from within Symfony Api Platform:
From the image above, what my endpoint is expecting is a JSON containing required values. I am defining required values to be in the path but that is NOT true and they don't belong even to: query, header or cookies.
I have tried two definitions (and I've removed some lines that aren't relevant for the resolution):
// the definition result is on the first image on this post
resources:
App\Entity\Cases:
collectionOperations:
case_assign:
swagger_context:
parameters:
- name: assign_type
in: path
description: 'The assignee type: worker or reviewer'
required: true
type: string
// ....
- in: body
name: body
description: 'Object needed to perform a case assignment'
required: true
example: {
"assign_type": "worker",
"assigned_by": 1,
"assigned_to": 1,
"cases": {
"0": 109855,
"1": 109849,
"2": 109845
}
}
And the second definition looks like:
resources:
App\Entity\Cases:
collectionOperations:
case_assign:
swagger_context:
summary: 'Assign a worker or a reviewer to a case'
parameters:
- name: body
in: body
required: true
schema:
type: array
items:
assign_type:
name: assign_type
description: 'The assignee type: worker or reviewer'
required: true
type: string
And here is the result:
None of them seem to be doing what I need or expect, what I am doing wrong? Can I get some help?
I have also read several pages/post without found a good example or the right way to do it (see the following list):
https://github.com/api-platform/api-platform/issues/1019
https://api-platform.com/docs/core/swagger/
https://idratherbewriting.com/learnapidoc/pubapis_swagger_intro.html
https://swagger.io/docs/specification/describing-parameters/
https://swagger.io/docs/specification/describing-request-body/
How to describe this POST JSON request body in OpenAPI (Swagger)?
You can use a SwaggerDecorator as described in the docs to override the generated swagger.json and change pretty much anything you like. You will need to edit the definitions for v2
"paths": {
"/todos": {
"post": {
"parameters": [
{
"name": "todo",
"in": "body",
"description": "The new Todo resource",
"schema": {
"$ref": "#/definitions/Todo"
}
}
]
}}}
"definitions": {
"Todo": {
"type": "object",
"description": "",
"properties": {
"text": {
"required": true,
"description": "This text will be added to the schema as a description",
"type": "string"
},...
or the components.schemas in Openapi v3:
"components": {
"schemas": {
"Todo": {
"type": "object",
"description": "",
"properties": {
"text": {
"required": true,
"minLength": 4,
"example": "some example text",
"description": "This text will be added to the schema as a description",
"type": "string"
},...
Your other option is to use the "swagger_context" ("openapi_context" for openapi v3) of the #ApiResource or #ApiProperty Annotations. Valid options should be in the swagger docs.
/**
* This text will be added to the schema as a description
* #ApiProperty(
* swaggerContext={"required"=true},
* openapiContext={"required"=true, "minLength"=4, "example"="some example text"})
* #ORM\Column(type="string", length=255)
*/
private $text;
Would result in:
example doc
Edit:
I just noticed that there is an error in your yaml configuration. You are trying to setup the documentation for an array. I assume you want to actually send an object
parameters:
- name: body
in: body
required: true
schema:
type: object
required: #only for swagger v2
- assign_type
properties:
assign_type:
description: 'The assignee type: worker or reviewer'
required: true #only for openapi v3
type: string
assigned_by:
...
You can check the correct syntax for Data Types here.

JAGQL - Why do I need an id for a post call?

I'm using JAGQL to build a JSON API compatible express server. My database behind it is MongoDB (jsonapi-store-mongodb). I posted my question here as well: https://github.com/holidayextras/jsonapi-store-mongodb/issues/59
According to the JAGQL documentation, https://jagql.github.io/pages/project_setup/resources.html#generateid,
I am told that
generateId
By default, the server autogenerates a UUID for resources which are created without specifying an ID. To disable this behavior (for example, if the database generates an ID by auto-incrementing), set generateId to false. If the resource's ID is not a UUID, it is also necessary to specify an id attribute with the correct type. See /examples/resorces/autoincrement.js for an example of such a resource.
But when I send a POST request to one of my resources, I get this:
"jsonapi": {
"version": "1.0"
},
"meta": {},
"links": {
"self": "/myresource"
},
"errors": [
{
"status": "403",
"code": "EFORBIDDEN",
"title": "Param validation failed",
"detail": [
{
"message": "\"id\" is required",
"path": [
"id"
],
"type": "any.required",
"context": {
"key": "id",
"label": "id"
}
}
]
}
]
What am I missing?
See here for more details: https://github.com/jagql/framework/issues/106
In your resource definition, you want to add primaryKey: 'uuid':
{
resource: 'things',
handlers,
primaryKey: 'uuid',
attributes: {
...
}
}

Simulator error UnparseableJsonResponse ("Cannot find field.")

I have successfully tested the first few intents of my app with my webhook in the DialogFlow console, but testing in the Simulator gives the following error:
UnparseableJsonResponse API Version 2: Failed to parse JSON response
string with 'INVALID_ARGUMENT' error: ": Cannot find field.".
NB!!!
The first thing to notice is that it refers to "API Version 2".
No requests are reaching my webhook - so it appears that this is all within Google.
Using Chrome Developer Tools, I see the Network entry that gets this error response - some details below:
Request url from Simulator: https://assistant.clients6.google.com/v1/assistant:converse?alt=json&key=A.....
NB!!!
(Note it says 'v1')
Request Payload:
{"conversationToken":"","debugLevel":1,"inputType":"KEYBOARD","locale":"en-US","mockLocation":{"city":"Mountain View","coordinates":{"latitude":37.421980615353675,"longitude":-122.08419799804688},"formattedAddress":"Googleplex, Mountain View, CA 94043, United States","zipCode":"94043"},"query":"Talk to ","surface":"PHONE"}
Response:
{
"response": "Connect the docs isn't responding right now. Try again soon.",
"conversationToken": "GidzaW11bGF0b3JfZGV2aWNlXzM3MTQxRERFM0I0Nzk1Q0ZfMDAwMDA=",
"audioResponse": "//NExAAR... encoded audio ...",
"debugInfo": {
"assistantToAgentDebug": {
"curlCommand": "curl -v 'https://api.api.ai/api/integrations/google?token=...token...' -H 'Content-Type: application/json;charset=UTF-8' -H 'Google-Actions-API-Version: 2' -H 'Authorization: ...authorization key...' -A 'Mozilla/5.0 (compatible; Google-Cloud-Functions/2.1; +http://www.google.com/bot.html)' -X POST -d '{\"user\":{\"userId\":\"...user id...\",\"locale\":\"en-US\",\"lastSeen\":\"2017-12-15T17:22:55Z\"},\"conversation\":{\"conversationId\":\"1513778713541\",\"type\":\"NEW\"},\"inputs\":[{\"intent\":\"actions.intent.MAIN\",\"rawInputs\":[{\"inputType\":\"KEYBOARD\",\"query\":\"Talk to Connect The Docs\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"}]}]}'",
"assistantToAgentJson": "{\"user\":{\"userId\":\"...user id...\",\"locale\":\"en-US\",\"lastSeen\":\"2017-12-15T17:22:55Z\"},\"conversation\":{\"conversationId\":\"1513778713541\",\"type\":\"NEW\"},\"inputs\":[{\"intent\":\"actions.intent.MAIN\",\"rawInputs\":[{\"inputType\":\"KEYBOARD\",\"query\":\"Talk to Connect The Docs\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"}]}]}"
},
"agentToAssistantDebug": {
"agentToAssistantJson": "{\"message\":\"Unexpected apiai response format: Empty speech response\",\"apiResponse\":{\"id\":\"24ddbf1c-3930-40c6-ba50-03c0935cd1d0\",\"timestamp\":\"2017-12-20T14:05:13.766Z\",\"lang\":\"en-us\",\"result\":{},\"status\":{\"code\":200,\"errorType\":\"success\"},\"sessionId\":\"1513778713541\"}}"
},
"sharedDebugInfo": [{
"name": "ResponseValidation",
"subDebugEntry": [{
"name": "UnparseableJsonResponse",
"debugInfo": "API Version 2: Failed to parse JSON response string with 'INVALID_ARGUMENT' error: \": Cannot find field.\"."
}]
}]
},
"visualResponse": {}
}
I have been informed by Google Support that I am indeed using version V2 - I initiated this in December 2017 - long after the May 2017 "cutoff date" where V2 is supposed to be the default.
Is this a Google bug? Have I missed something setting up my intents? Or is there another setting that may be causing this?
I see that other posts in the DialogFlow forum show the same problem.
Any help is appreciated.
Added on 1/9/2018:
Contents of the Debug Tab:
{
"agentToAssistantDebug": {
"agentToAssistantJson": {
"message": "Unexpected apiai response format: Empty speech response",
"apiResponse": {
"id": "64a900d2-23e8-4833-b9de-0b207f63bffc",
"timestamp": "2018-01-08T21:08:36.821Z",
"lang": "en-us",
"result": {},
"status": {
"code": 200,
"errorType": "success"
},
"sessionId": "1515445716570"
}
}
},
"assistantToAgentDebug": {
"assistantToAgentJson": {
"user": {
"userId": "ABwppHFGoTJm5fKpau6WWwufKQE5UwkebooowZF7YhvD7PPY-hUfxU2_KRpB0LLNcLPyXasbXnRxXT6fniKk",
"locale": "en-US",
"lastSeen": "2018-01-05T15:53:11Z"
},
"conversation": {
"conversationId": "1515445716570",
"type": "NEW"
},
"inputs": [
{
"intent": "actions.intent.MAIN",
"rawInputs": [
{
"inputType": "VOICE",
"query": "talk to connect the docs"
}
]
}
],
"surface": {
"capabilities": [
{
"name": "actions.capability.AUDIO_OUTPUT"
},
{
"name": "actions.capability.SCREEN_OUTPUT"
},
{
"name": "actions.capability.WEB_BROWSER"
}
]
},
"isInSandbox": true,
"availableSurfaces": [
{
"capabilities": [
{
"name": "actions.capability.AUDIO_OUTPUT"
},
{
"name": "actions.capability.SCREEN_OUTPUT"
}
]
}
]
},
"curlCommand": "curl -v 'https://api.api.ai/api/integrations/google?token=0ffc8bcf72704850a4b4139d49a8d72e' -H 'Content-Type: application/json;charset=UTF-8' -H 'Google-Actions-API-Version: 2' -H 'Authorization: eyJhbGciOiJSUzI1NiIsImtpZCI6IjBhYTQ1NDFlNGM4ZWVhODQ0NjhmZTYxYTkzZmIxYzA2MzJkYjVhMGYifQ.eyJhdWQiOiJhY3RpdmUtZG9jdW1lbnQiLCJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJqdGkiOiIwY2U2OTdlNmE3NGFiZmVmZTdiYzhmMGU2ZGJlMzEyMDFjOWU3MzA5IiwiaWF0IjoxNTE1NDQ1NzE2LCJleHAiOjE1MTU0NDU4MzYsIm5iZiI6MTUxNTQ0NTQxNn0.hZNpVrH4o8ObGIvZ7BQV44nymekTWR_K4_jsDKCzgj74z57IDyUXNGEZs6KUFxBM_2FXiSoOxJUQZ1OhDRpkpQ6L4LELYN_JDhly7kgy-SLgKgLG6FZ4YV-8qOgr9Uxmr9SsG6NSXdiG7HvTrHLXIwA8K2siBNGGDWAIB691gAC8qsjsq4d3VnHMTeqlJ6mDoOtZ2xdLnJbK5B-OK-rLHEhX6K1-Z7rXQL3OgSwUtRVvYfHI3jqY83Xn3-uf06izkQhwVqH-W6X1REltrlxFTPW2h72D-st-QQ9euIpK3fn0x-z3ouQ17g-rGrPjKcOop9FejtKMT1tibxSkQ7qywQ' -A 'Mozilla/5.0 (compatible; Google-Cloud-Functions/2.1; +http://www.google.com/bot.html)' -X POST -d '{\"user\":{\"userId\":\"ABwppHFGoTJm5fKpau6WWwufKQE5UwkebooowZF7YhvD7PPY-hUfxU2_KRpB0LLNcLPyXasbXnRxXT6fniKk\",\"locale\":\"en-US\",\"lastSeen\":\"2018-01-05T15:53:11Z\"},\"conversation\":{\"conversationId\":\"1515445716570\",\"type\":\"NEW\"},\"inputs\":[{\"intent\":\"actions.intent.MAIN\",\"rawInputs\":[{\"inputType\":\"VOICE\",\"query\":\"talk to connect the docs\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.WEB_BROWSER\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"}]}]}'"
},
"sharedDebugInfo": [
{
"name": "ResponseValidation",
"subDebugEntry": [
{
"debugInfo": "API Version 2: Failed to parse JSON response string with 'INVALID_ARGUMENT' error: \": Cannot find field.\".",
"name": "UnparseableJsonResponse"
}
]
}
]
}
Contents of the Validation Errors Tab:
UnparseableJsonResponse
API Version 2: Failed to parse JSON response string with
'INVALID_ARGUMENT' error: ": Cannot find field.".
Screenshot of welcome intent added 1/10/2018:
The problem is a combination of two things:
There are no text replies set in the Response section.
When the Intent is triggered, it does not get sent to a webhook.
As a result, Dialogflow replies to the Assistant with no text response, which is an error.
You can correct this by making sure your welcome intent does one of the following (you don't have to do both):
Set one or more text replies. These would be sent back when the Intent is called.
Check the Use webhook box under Fulfillment. This would call your webhook when the Intent is triggered. (And then make sure that your webhook returns a valid response.)
As you speculated in your comments, you could also change the Welcome Intent to one of your other Intents that you've already tested to respond. There is nothing special about this particular Welcome Intent - it was just the one created by default for you.

Google Cloud Endpoints - Auth0 - "id_token verification failed: Invalid token signature"

I am trying to setup Auth0 with Google Cloud Endpoints.
I followed instructions from
https://cloud.google.com/endpoints/docs/frameworks/python/quickstart-frameworks-python
https://cloud.google.com/endpoints/docs/openapi-configuration
https://cloud.google.com/endpoints/docs/authenticating-users
I want to call "http://10.50.10.31:8080/_ah/api/echo/v1/test/" from my iOS app with an Auth0 authenticated user I already created from the Auth0 iOS SDK.
let url = URL(string: "http://10.50.10.31:8080/_ah/api/echo/v1/test/")!
var request = URLRequest(url: url)
request.addValue("Bearer \(session.token.idToken)", forHTTPHeaderField: "Authorization")
let task = URLSession.shared.dataTask(with: request) { data, response, error in
print(data)
print(response)
}
task.resume()
The Swift code works fine. The session.idToken comes from the Auth0 iOS framework.
The file app.yaml is
runtime: python27
api_version: 1
threadsafe: true
env_variables:
# The following values are to be replaced by information from the output of
# 'gcloud service-management deploy swagger.json' command.
ENDPOINTS_SERVICE_NAME: echo-api.endpoints.duskmotion-2016.cloud.goog
ENDPOINTS_SERVICE_VERSION: 2017-02-16r0
builtins:
- appstats: on
- admin_redirect: on
- deferred: on
- remote_api: on
libraries:
- name: jinja2
version: "2.6"
- name: markupsafe
version: "0.15"
- name: pycrypto
version: "2.6.1"
- name: enum
version: "0.9.23"
- name: protorpc
version: "1.0"
- name: pytz
version: "2016.4"
- name: six
version: "1.9.0"
- name: ssl
version: "2.7.11"
- name: werkzeug
version: "0.11.10"
inbound_services:
- warmup
handlers:
- url: /favicon.ico
static_files: application/static/img/favicon.ico
upload: application/static/img/favicon.ico
- url: /robots.txt
static_files: application/static/robots.txt
upload: application/static/robots.txt
- url: /gae_mini_profiler/static
static_dir: lib/gae_mini_profiler/static
- url: /gae_mini_profiler/.*
script: lib.gae_mini_profiler.main.application
- url: /static
static_dir: application/static
- url: /admin/logout
script: run.application.app
secure: always
login: required
- url: /admin/.*
script: run.application.app
secure: always
login: admin
auth_fail_action: redirect
- url: /_ah/warmup
script: run.application.app
secure: always
- url: /_ah/.*
script: run.application.urls.api
- url: .*
script: run.application.app
secure: always
skip_files:
- ^(.*/)?#.*#$
- ^(.*/)?.*~$
- ^(.*/)?.*\.py[co]$
- ^(.*/)?.*/RCS/.*$
- ^(.*/)?.*\(dev\).tmpl
- ^(.*/)?\..*$
- ^(.*/)?setuptools/script \(dev\).tmpl$
The file main.py is
import endpoints
from protorpc import message_types
from protorpc import messages
from protorpc import remote
auth0_issuer = endpoints.Issuer(
issuer='https://duskmotion.auth0.com/',
jwks_uri='https://duskmotion.auth0.com/.well-known/jwks.json')
class EchoRequest(messages.Message):
content = messages.StringField(1)
class EchoResponse(messages.Message):
"""A proto Message that contains a simple string field."""
content = messages.StringField(1)
ECHO_RESOURCE = endpoints.ResourceContainer(
EchoRequest,
n=messages.IntegerField(2, default=1))
#endpoints.api(name='echo', version='v1', issuers={"auth0-jwk" : auth0_issuer})
class EchoApi(remote.Service):
#endpoints.method(
# This method takes a ResourceContainer defined above.
message_types.VoidMessage,
# This method returns an Echo message.
EchoResponse,
path='test',
http_method='GET',
name='echo_test_get')
def echo_test_get(self, request):
# auth = request.headers.get('Authorization', None)
import logging
logging.info(request)
user = endpoints.get_current_user()
content = "Nothing"
if user:
content = "It is working"
import logging
logging.info(content)
if not user:
raise endpoints.UnauthorizedException
return EchoResponse(content=content)
api = endpoints.api_server([EchoApi])
After being generating API file, I manually added the "Security" "x-security" and "securityDefinitions".
The file echov1openapi.json looks like
{
"basePath": "/_ah/api",
"consumes": [
"application/json"
],
"definitions": {
"ApplicationUrlsEchoResponse": {
"properties": {
"content": {
"type": "string"
}
},
"type": "object"
}
},
"host": "echo-api.endpoints.duskmotion-2016.cloud.goog",
"info": {
"title": "echo",
"version": "v1"
},
"paths": {
"/echo/v1/test": {
"get": {
"operationId": "EchoApi_echoTestGet",
"parameters": [],
"responses": {
"200": {
"description": "A successful response",
"schema": {
"$ref": "#/definitions/ApplicationUrlsEchoResponse"
}
}
},
"security": [
{
"auth0_jwk": []
}
]
}
}
},
"produces": [
"application/json"
],
"schemes": [
"http"
],
"x-security": [{
"auth0_jwk": {
"audiences": [
"xxxxxxxxxxxxxxxxxx"
]
}
}],
"securityDefinitions": {
"auth0_jwk": {
"authorizationUrl": "https://duskmotion.auth0.com/authorize",
"flow": "implicit",
"type": "oauth2",
"x-issuer": "https://duskmotion.auth0.com/",
"x-jwks_uri": "https://duskmotion.auth0.com/.well-known/jwks.json"
}
},
"swagger": "2.0"
}
When I run locally on Google App Engine development server, I get
DEBUG 2017-02-16 23:55:25,551 users_id_token.py:198] Checking for id_token.
DEBUG 2017-02-16 23:55:25,551 users_id_token.py:485] Loading certs from https://www.googleapis.com/service_accounts/v1/metadata/raw/federated-signon#system.gserviceaccount.com
DEBUG 2017-02-16 23:55:25,568 users_id_token.py:269] id_token verification failed: Invalid token signature
DEBUG 2017-02-16 23:55:25,569 users_id_token.py:209] Checking for oauth token.
DEBUG 2017-02-16 23:55:25,569 users_id_token.py:340] Fetching token info from https://www.googleapis.com/oauth2/v1/tokeninfo
ERROR 2017-02-16 23:55:25,840 users_id_token.py:349] Token info endpoint returned status 400: Invalid Value
The debug lines 2 and 5 are from myself.
Why do the *.googleapis.com endpoints are getting called instead of my *.auth0.com?
What am I missing in my settings an in the .py file to make it work?
This is a a known issue with Endpoints Frameworks on the development server, and is reported on the project issue tracker: 3rd-party auth does not work with dev-server #55.
See also the related Google Groups thread for an ongoing discussion.

Resources