oauth2

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Auth0ClientId = "A4ONXSaOGstwwir0zUztoI6zjyt9zsRH"
	Auth0URL      = "https://login.pinecone.io"
	Auth0Audience = "https://us-central1-production-console.cloudfunctions.net/api/v1"
)

Variables

This section is empty.

Functions

func GetHttpClient

func GetHttpClient(ctx context.Context, useApiKey bool) *http.Client

func LogTokenClaims

func LogTokenClaims(token *oauth2.Token, msg string)

Types

type DeviceAuth

type DeviceAuth struct{}

func (*DeviceAuth) GetAuthResponse

func (da *DeviceAuth) GetAuthResponse(ctx context.Context) (*oauth2.DeviceAuthResponse, error)

func (*DeviceAuth) GetDeviceAccessToken

func (da *DeviceAuth) GetDeviceAccessToken(ctx context.Context, deviceAuthResponse *oauth2.DeviceAuthResponse) (*oauth2.Token, error)

type MyCustomClaims

type MyCustomClaims struct {
	Scope string `json:"scope"`
	Email string `json:"https://pinecone.io/email"`
	jwt.RegisteredClaims
}

func ParseClaimsUnverified

func ParseClaimsUnverified(token *oauth2.Token) (*MyCustomClaims, error)

Jump to

Keyboard shortcuts

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