Documentation
¶
Index ¶
- Constants
- func ContextWithToken(ctx context.Context, token *Token) context.Context
- func GetGoogleIAPJWTClaims(ctx context.Context) (map[string]interface{}, error)
- func GetGoogleIDTokenClaims(ctx context.Context) (map[string]interface{}, error)
- func WithGoogleIAPJWTClaims(ctx context.Context, claims map[string]interface{}) context.Context
- func WithGoogleIDTokenClaims(ctx context.Context, claims map[string]interface{}) context.Context
- func WithHTTPRequest(ctx context.Context, req *HTTPRequest) context.Context
- func WithSNSMessage(ctx context.Context, msg *message.SNS) context.Context
- type Context
- type HTTPRequest
- type Token
- type TokenID
- type TokenSecret
Constants ¶
View Source
const TokenExpireDuration = 7 * 24 * time.Hour
Variables ¶
This section is empty.
Functions ¶
func GetGoogleIAPJWTClaims ¶
GetGoogleIAPJWTClaims retrieves Google IAP JWT claims from context
func GetGoogleIDTokenClaims ¶
GetGoogleIDTokenClaims retrieves Google ID token claims from context
func WithGoogleIAPJWTClaims ¶
func WithGoogleIDTokenClaims ¶
func WithHTTPRequest ¶
func WithHTTPRequest(ctx context.Context, req *HTTPRequest) context.Context
Types ¶
type Context ¶
type Context struct {
Google map[string]interface{} `json:"google"`
IAP map[string]interface{} `json:"iap"`
SNS *message.SNS `json:"sns"`
Req *HTTPRequest `json:"req"`
Env map[string]string `json:"env" masq:"secret"`
}
func BuildContext ¶
type HTTPRequest ¶
type Token ¶
type TokenSecret ¶
type TokenSecret string
func NewTokenSecret ¶
func NewTokenSecret() TokenSecret
func (TokenSecret) String ¶
func (x TokenSecret) String() string
Click to show internal directories.
Click to hide internal directories.