GoPubSub | Google Cloud Pub/Sub simple UI | GCP library
kandi X-RAY | GoPubSub Summary
kandi X-RAY | GoPubSub Summary
Google Cloud Pub/Sub simple UI
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of GoPubSub
GoPubSub Key Features
GoPubSub Examples and Code Snippets
topics:
-
name: my-topic
project: my-gcp-project
subscription: my-subscription
-
name: my-other-topic
project: other-gcp-project
subscription: my-other-subscription
payloads:
-
name: hello
payload
go get -u github.com/clickandmortar/gopubsub
export GOPUBSUB_CONFIG="/path/to/config.yaml"
# To use local emulator
export PUBSUB_EMULATOR_HOST=localhost:8085
# To use actual Pub/Sub service
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/applicati
docker pull clickandmortar/gopubsub
docker run -d \
-v $(pwd)/config.yaml:/go/src/app/config.yaml \
-p 8080:8080 \
--name="gopubsub" \
-e PUBSUB_EMULATOR_HOST=pubsub:8085 \
clickandmortar/gopubsub
Community Discussions
Trending Discussions on GoPubSub
QUESTION
What I'm trying to do is generate a JWT for calling the HTTP trigger on a GCP Cloud Function I've deployed. I've already deployed my function with 'allUsers' and verified it works, but I want it to be more secure, so I need to attach a JWT to my HTTP request. I'm following this code and the following snippets are mostly from that. I think I am close, but not quite there yet. In all of the samples etc below I've changed my project name to PROJECT_NAME.
First I created a service account named testharness-sa and downloaded its key file. I have an env var GOOGLE_APPLICATION_CREDENTIALS pointing to that file when I run my tests. Then I ran the following command:
...ANSWER
Answered 2020-Apr-06 at 06:28I found the answer was not related to scope, despite the error message. It is actually related to the clientId
value I was passing (and didn't really mention in my question, though it is there in the code). I was using a value I found in the service account json file, a really long string of digits. That was the problem. It needed to be the URL of my HTTP trigger. So these are the constants I ended up with:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install GoPubSub
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page