auth

package
v0.0.0-...-c86a4d9 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCredentials

func NewCredentials(clientID, clientSecret string) *oauth2.Config

NewCredentials creates an oauth2 credentials config from a valid client id and secret

func NewGrpcConnection

func NewGrpcConnection(token *oauth2.Token, developerToken string, loginCustomerID string) (*grpc.ClientConn, context.Context, error)

NewGrpcConnection creates a new authenticated grpc client and context with authentication headers

func NewPartialToken

func NewPartialToken(refreshToken string) *oauth2.Token

NewPartialToken creates a partial oauth2 token from a valid refresh token

func RefreshToken

func RefreshToken(creds *oauth2.Config, token *oauth2.Token, ctx ...context.Context) (*oauth2.Token, error)

RefreshToken creates a new oauth2 token from an existing partial/expired token and valid credentials

Types

This section is empty.

Jump to

Keyboard shortcuts

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