auth

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetAuthToken = jwt.GetAuthToken
View Source
var GetParsedToken = jwt.GetParsedToken
View Source
var Parse = jwt.Parse

Functions

func GetCachedTokenProvider

func GetCachedTokenProvider(config configuration.Config) (func(userid string) (token Token, err error), error)

Types

type OpenidToken

type OpenidToken struct {
	AccessToken      string    `json:"access_token"`
	ExpiresIn        float64   `json:"expires_in"`
	RefreshExpiresIn float64   `json:"refresh_expires_in"`
	RefreshToken     string    `json:"refresh_token"`
	TokenType        string    `json:"token_type"`
	RequestTime      time.Time `json:"-"`
}

func GetOpenidToken

func GetOpenidToken(authEndpoint string, authClientId string, authClientSecret string) (openid OpenidToken, err error)

func RefreshOpenidToken

func RefreshOpenidToken(authEndpoint string, authClientId string, authClientSecret string, refreshToken string) (openid OpenidToken, err error)

func (*OpenidToken) EnsureAccess

func (this *OpenidToken) EnsureAccess(config configuration.Config) (token string, err error)

type Token

type Token = jwt.Token

func ExchangeUserToken

func ExchangeUserToken(config configuration.Config, userid string) (token Token, expiration int, err error)

Jump to

Keyboard shortcuts

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