Skip to content
/ gcpauth Public

Auth libirary for a http request with oidc token from GCP services (Cloud Scheduler, Cloud Pub/Sub)

Notifications You must be signed in to change notification settings

k-yomo/gcpauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gcpauth

Auth library to verify OpenID Connect ID Token from GCP services.

Common usecase

  • When you need to authenticate requests from cloud scheduler on Cloud Run which allows public access

Usage

  • Assuming you want to verify requests from the above Cloud Scheduler.
issuerEmail := "[email protected]"
aud := "Ais5cie5"
if err := gcpauth.VerifyIDToken(ctx, issuerEmail, &gcpauth.Config{Aud: aud}); err != nil {
  // return 401
}
// continue

About

Auth libirary for a http request with oidc token from GCP services (Cloud Scheduler, Cloud Pub/Sub)

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages