auth

package
v1.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsGCPInternal

func IsGCPInternal(r *http.Request) bool

IsGCPInternal is Request が GCP 内部の Component から送られてきたかを返す

該当するもの Cloud Tasks App Engine Task

Types

type JWTPayload

type JWTPayload struct {
	Audience        string `json:"aud"`            // JWTを受け取る予定の対象者 example:https://gcpboxtest-73zry4yfvq-an.a.run.app/cloudtasks/run/json-post-task
	AuthorizedParty string `json:"azp"`            // 認可された対象者 example:102542703233071533897
	Email           string `json:"email"`          // JWT発行者のEmail example:sinmetal-ci@appspot.gserviceaccount.com
	EmailVerified   bool   `json:"email_verified"` // メールアドレスが検証済みか
	Expires         int    `json:"exp"`            // 有効期限(EpochTime seconds) example:1602514972
	IssuedAt        int    `json:"iat"`            // 発行日時(EpochTime seconds) example:1602511372
	Issuer          string `json:"iss"`            // 発行者 (issuer) example:https://accounts.google.com
	Subject         string `json:"sub"`            // UserID example:102542703233071533897
}

JWTPayload is JWT Payload

func ParseJWTPayload

func ParseJWTPayload(jwt string) (*JWTPayload, error)

ParseJWTPayload is JWT全体から の Payload を抜き出して返す

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL