Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The audience argument for @endpoints.api should be optional #133

Open
bigunyak opened this issue Jan 29, 2018 · 0 comments
Open

The audience argument for @endpoints.api should be optional #133

bigunyak opened this issue Jan 29, 2018 · 0 comments

Comments

@bigunyak
Copy link

The documentation states the following:

If the "aud" (audience) claim in a JWT token matches the Cloud Endpoints service name, then Endpoints Frameworks validates the audience and ignores the values set in the audiences argument in the @endpoints.api decorator. For example, if your service name is "myservice.appspot.com", then a JWT with "aud" set to "myservice.appspot.com" or "https://myservice.appspot.com" is a valid audience.

That doesn't seem to work.
Following an example described on this page, I generate a Google ID token and set TARGET_AUD with https://[SERVICE_NAME], where [SERVICE_NAME] is the value of the host entry in the API configuration file. Then I expect the audience argument to be ignored as it's stated in the docs but it's actually still required.
The interesting thing is that it's optional and works as expected when authentication arguments are configured in @endpoints.method. That could be related to another bug (#64) that exposes differences between @endpoints.api and @endpoints.method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant