Documentation ¶
Overview ¶
Package noaabridge wraps a UAA client and a tokenCache to support the TokenRefresher interface for noaa/consumer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenCache ¶
type TokenCache interface { RefreshToken() string SetAccessToken(token string) SetRefreshToken(token string) }
TokenCache is where the UAA token information is stored.
type TokenRefresher ¶
type TokenRefresher struct {
// contains filtered or unexported fields
}
TokenRefresher implements the TokenRefresher interface. It requires a UAA client and a token cache for storing the access and refresh tokens.
func NewTokenRefresher ¶
func NewTokenRefresher(uaaClient UAAClient, cache TokenCache) *TokenRefresher
NewTokenRefresher returns back a pointer to a TokenRefresher.
func (*TokenRefresher) RefreshAuthToken ¶
func (t *TokenRefresher) RefreshAuthToken() (string, error)
RefreshAuthToken refreshes the current Authorization Token and stores the Access and Refresh token in it's cache. The returned Authorization Token includes the type prefixed by a space.
Click to show internal directories.
Click to hide internal directories.