firebase

package
v0.0.0-...-c4b140d Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const GatewayUserInfoHeader = "X-Apigateway-Api-Userinfo"

Variables

This section is empty.

Functions

func HandleAuth

func HandleAuth(h http.Handler) http.HandlerFunc

Types

type Firebase

type Firebase interface {
	ParseEncodedUser(encodedUser string) (*UserInfo, error)
}

func NewFirebase

func NewFirebase(databaseURL string, opt ...option.ClientOption) (Firebase, error)

type Identities

type Identities struct {
	GoogleCom []string `json:"google.com"`
	Email     []string `json:"email"`
}

type UserID

type UserID string

type UserInfo

type UserInfo struct {
	Name          string       `json:"name"`
	Picture       string       `json:"picture"`
	Iss           string       `json:"iss"`
	Aud           string       `json:"aud"`
	AuthTime      int          `json:"auth_time"`
	UserID        UserID       `json:"user_id"`
	Sub           string       `json:"sub"`
	Iat           int          `json:"iat"`
	Exp           int          `json:"exp"`
	Email         string       `json:"email"`
	EmailVerified bool         `json:"email_verified"`
	Firebase      firebase     `json:"firebase"`
	StripeRole    *domain.Role `json:"stripeRole"`
}

Jump to

Keyboard shortcuts

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