authentication

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticateUser

func AuthenticateUser(oauthClient *oauthv2.OAuthClient, opts config.AppOptions, storer storage.Storer) (oauthv2.OAuthToken, error)

func RefreshToken

func RefreshToken(oauthClient *oauthv2.OAuthClient, opts config.AppOptions, token oauthv2.OAuthToken, storer storage.Storer) (oauthv2.OAuthToken, error)

Types

type Authenticator

type Authenticator interface {
	GetToken() (oauthv2.OAuthToken, TokenStatus)
	StoreToken() error
	RefreshToken() error
}

type TokenStatus

type TokenStatus int
const (
	DoesntExist TokenStatus = iota
	Expired
	Valid
	TOKEN_KEY = "msgraphtoken"
)

Jump to

Keyboard shortcuts

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