auth

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoCredentialsFile = errors.New("no local credentials file")
	ErrEmailUnverified   = errors.New("login email hasn't been verified")
)

Functions

func CallGetTokenEndpoint

func CallGetTokenEndpoint(state string) error

func CallLoginEndpoint

func CallLoginEndpoint() (string, error)

func CallLogoutEndpoint

func CallLogoutEndpoint() error

func CallRefreshToken

func CallRefreshToken(token string) error

func Login

func Login(onError func(error) error) error

func WriteIDToken

func WriteIDToken(token string) error

Types

type Auth0Authorizer

type Auth0Authorizer struct{}

func (Auth0Authorizer) Authorize

func (s Auth0Authorizer) Authorize() (LoginInfo, error)

type Credentials

type Credentials struct {
	IdToken      string
	RefreshToken string
}

func GetIDToken

func GetIDToken() (*Credentials, error)

type LoginInfo

type LoginInfo struct {
	Authorizer    string
	Email         string
	EmailVerified bool
}

func Authorize

func Authorize() (LoginInfo, error)

type LoginResponse

type LoginResponse struct {
	Url   string
	State string
}

Jump to

Keyboard shortcuts

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