repository

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Copyright (c) 2021 AccelByte Inc. All Rights Reserved. This is licensed software from AccelByte Inc, for limitations and restrictions contact your company contract manager.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertInterfaceToModel added in v0.26.0

func ConvertInterfaceToModel(tokenInterface interface{}) (*iamclientmodels.OauthmodelTokenResponseV3, error)

func GetExpiresIn added in v0.23.0

func GetExpiresIn(repository TokenRepository) (*int32, error)

func GetRefreshExpiresIn added in v0.23.0

func GetRefreshExpiresIn(repository TokenRepository) (int32, error)

func GetRefreshToken added in v0.23.0

func GetRefreshToken(repository TokenRepository) (string, error)

func GetSecondsTillExpiry added in v0.23.0

func GetSecondsTillExpiry(repository TokenRepository, refreshRate float64) time.Duration

func GetSecondsTillExpiryRefresh added in v0.23.0

func GetSecondsTillExpiryRefresh(repository TokenRepository, refreshRate float64) time.Duration

func HasRefreshTokenExpired added in v0.23.0

func HasRefreshTokenExpired(repository TokenRepository, refreshRate float64) bool

func HasToken added in v0.23.0

func HasToken(repository TokenRepository) bool

func HasTokenExpired added in v0.23.0

func HasTokenExpired(repository TokenRepository, refreshRate float64) bool

Types

type ConfigRepository

type ConfigRepository interface {
	GetClientId() string
	GetClientSecret() string
	GetJusticeBaseUrl() string
}

type RefreshTokenRepository added in v0.21.0

type RefreshTokenRepository interface {
	DisableAutoRefresh() bool
	GetRefreshRate() float64
	SetRefreshIsRunningInBackground(b bool)
}

type TokenRepository

type TokenRepository interface {
	Store(accessToken interface{}) error
	GetToken() (*iamclientmodels.OauthmodelTokenResponseV3, error)
	RemoveToken() error
	TokenIssuedTimeUTC() time.Time
}

Jump to

Keyboard shortcuts

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