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

[Pub/Sub]: add sample for decoding and verifying JWT from Pub/Sub #1243

Open
anguillanneuf opened this issue Dec 15, 2020 · 0 comments
Open
Labels
api: pubsub Issues related to the Pub/Sub API. samples Issues that are directly related to samples. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@anguillanneuf
Copy link
Member

Please add a sample in this directory and show how to decode and verify a JWT included in the header of a Pub/Sub push message (when authenticated push is enabled). The other language (Go, Node.js, Java, Python) samples already exist. This sample will be used alongside those.

I'm not sure if PHP has a cloud client library for this task (please find out if you can), but it appears to have an API client library google-api-php-client that does the job, specifically, the verifyIdToken() method.

You can use Google's public keys referenced here to verify JWTs from the real Pub/Sub service. For writing tests, you can use mocked public keys in other language samples.

You can use the region tag gaeflex_net_pubsub_auth_push for this sample.

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Dec 15, 2020
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Dec 16, 2020
@jdpedrie jdpedrie added api: pubsub Issues related to the Pub/Sub API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed triage me I really want to be triaged. labels Dec 17, 2020
@jdpedrie jdpedrie self-assigned this Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. samples Issues that are directly related to samples. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants