Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("key not found in cache")
View Source
var MB = 1024 * 1024 //used like NewCache(20 * MB, 60) to get a 20 mb cache
Functions ¶
func GetAuthToken ¶
func GetCachedTokenProvider ¶
func GetCachedTokenProvider(config configuration.Config) func(userid string) (token Token, err 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 (*OpenidToken) EnsureAccess ¶
func (this *OpenidToken) EnsureAccess(config configuration.Config) (token string, err error)
Click to show internal directories.
Click to hide internal directories.