oauth2

package
v0.0.53 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHttpClient

func GetHttpClient(ctx context.Context, orgId *string) (*http.Client, error)

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, orgId *string) (*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"`
	OrgId string `json:"https://pinecone.io/orgId"`
	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