state

package
Version: v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InvalidStateError

type InvalidStateError struct {
	Expected State
	Got      State
}

InvalidStateError is returned by Validate when the returned state is invalid.

func (InvalidStateError) Error

func (e InvalidStateError) Error() string

type State

type State string

State implements some utilities for working with OAuth2 state parameters.

func Generate

func Generate() (State, error)

Generate generates a new random state parameter of an appropriate size.

func (*State) String

func (s *State) String() string

String returns the string encoding of this state value.

func (*State) Validate

func (s *State) Validate(returnedState string) error

Validate the returned state (from a callback parameter).

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to