Visitar URL original
[Pub/Sub]: add sample for decoding and verifying JWT from Pub/Sub · Issue #1243 · GoogleCloudPlatform/php-docs-samples · GitHub
Skip to content

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

Description

@anguillanneuf

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.

Activity

  1. added
    api: pubsubIssues related to the Pub/Sub API.
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    and removed
    triage meI really want to be triaged.
    on Dec 17, 2020
  2. self-assigned this
    on Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: pubsubIssues related to the Pub/Sub API.samplesIssues that are directly related to samples.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions