Documentation ¶
Index ¶
- Constants
- func Fetch(opts *config.TokenOptions) []error
- func NewTokenOptions(options *options.Options, ztsUrl string, userAgent string) (*config.TokenOptions, error)
- func ToBeRefreshed(opts *config.TokenOptions) ([]config.AccessToken, []error)
- func TokenDirs(root string, tokens []config.AccessToken) []string
Constants ¶
View Source
const ( USER_AGENT = "User-Agent" TOKEN_REFRESH_PERIOD_PROP = "TOKEN_REFRESH_PERIOD" DEFAULT_REFRESH_DURATION = "1.5h" )
Variables ¶
This section is empty.
Functions ¶
func Fetch ¶
func Fetch(opts *config.TokenOptions) []error
func NewTokenOptions ¶ added in v1.11.3
func ToBeRefreshed ¶
func ToBeRefreshed(opts *config.TokenOptions) ([]config.AccessToken, []error)
ToBeRefreshed looks into /var/lib/sia/tokens folder and returns the list of tokens whose age is half of their validity
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.