Documentation ¶
Index ¶
- func CheckJWT(token string) error
- func GetExpiresIn(repository TokenRepository) (*int32, error)
- func GetRefreshExpiresIn(repository TokenRepository) (int32, error)
- func GetRefreshToken(repository TokenRepository) (string, error)
- func GetSecondsTillExpiry(repository TokenRepository, refreshRate float64) time.Duration
- func GetSecondsTillExpiryRefresh(repository TokenRepository, refreshRate float64) time.Duration
- func HasRefreshTokenExpired(repository TokenRepository, refreshRate float64) bool
- func HasToken(repository TokenRepository) bool
- func HasTokenExpired(repository TokenRepository, refreshRate float64) bool
- type AccountCommonJWTBanV3
- type AccountCommonNamespaceRole
- type AccountCommonPermissionV3
- type ConfigRepository
- type ExtendedConfigRepository
- type ObservableTokenRepository
- type RefreshTokenRepository
- type Token
- type TokenRepository
- type TokenRepositoryObserver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetExpiresIn ¶
func GetExpiresIn(repository TokenRepository) (*int32, error)
func GetRefreshExpiresIn ¶
func GetRefreshExpiresIn(repository TokenRepository) (int32, error)
func GetRefreshToken ¶
func GetRefreshToken(repository TokenRepository) (string, error)
func GetSecondsTillExpiry ¶
func GetSecondsTillExpiry(repository TokenRepository, refreshRate float64) time.Duration
func GetSecondsTillExpiryRefresh ¶
func GetSecondsTillExpiryRefresh(repository TokenRepository, refreshRate float64) time.Duration
func HasRefreshTokenExpired ¶
func HasRefreshTokenExpired(repository TokenRepository, refreshRate float64) bool
func HasToken ¶
func HasToken(repository TokenRepository) bool
func HasTokenExpired ¶
func HasTokenExpired(repository TokenRepository, refreshRate float64) bool
Types ¶
type AccountCommonJWTBanV3 ¶
type ConfigRepository ¶
type ExtendedConfigRepository ¶
type ExtendedConfigRepository interface { ConfigRepository GetCustomBasePath(servicePath string) string }
type ObservableTokenRepository ¶
type ObservableTokenRepository interface { TokenRepository RegisterObserver(observer *TokenRepositoryObserver) bool UnregisterObserver(observer *TokenRepositoryObserver) bool }
type RefreshTokenRepository ¶
type Token ¶
type Token struct { AccessToken *string `json:"access_token,omitempty"` AuthTrustID string `json:"auth_trust_id,omitempty"` Bans []*AccountCommonJWTBanV3 `json:"bans"` DisplayName string `json:"display_name,omitempty"` ExpiresIn *int32 `json:"expires_in,omitempty"` IsComply bool `json:"is_comply"` Jflgs int32 `json:"jflgs,omitempty"` Namespace *string `json:"namespace"` NamespaceRoles []*AccountCommonNamespaceRole `json:"namespace_roles"` Permissions []*AccountCommonPermissionV3 `json:"permissions"` PlatformID string `json:"platform_id,omitempty"` PlatformUserID string `json:"platform_user_id,omitempty"` RefreshExpiresIn int32 `json:"refresh_expires_in,omitempty"` RefreshToken string `json:"refresh_token,omitempty"` Roles []string `json:"roles"` Scope *string `json:"scope"` TokenType *string `json:"token_type"` UserID string `json:"user_id,omitempty"` Xuid string `json:"xuid,omitempty"` }
Token this is created to remove dependency to 'iam-sdk' references: iam-sdk/pkg/iamclientmodels.OauthmodelTokenResponseV3 iam-sdk/pkg/iamclientmodels/.OauthmodelTokenWithDeviceCookieResponseV3
func ConvertInterfaceToModel ¶
func ConvertStringToModelToken ¶
ConvertStringToModelToken converts access token string to Token struct used by iam Token Grant V3 endpoint
type TokenRepository ¶
type TokenRepositoryObserver ¶
Click to show internal directories.
Click to hide internal directories.