stoauth

package
v0.0.3-0...-16756a2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State struct {
	ClientID               string
	Scope                  string
	TokenURL               string
	StateCallbackURL       string
	MinAccessTokenValidity time.Duration
	// contains filtered or unexported fields
}

func NewState

func NewState() State

func (*State) AuthCodeFlow

func (s *State) AuthCodeFlow(requestID string, code string) error

func (*State) GetAccessToken

func (s *State) GetAccessToken() (string, error)

func (*State) Load

func (s *State) Load(fileName string) error

func (*State) Save

func (s *State) Save(fileName string) error

func (State) String

func (s State) String() string

obfuscate tokens/secrets when stringified

func (State) WithClientSecret

func (s State) WithClientSecret(secret string) State

func (State) WithContext

func (s State) WithContext(ctx context.Context) State

Jump to

Keyboard shortcuts

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