 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- func ConvertInterfaceToModel(tokenInterface interface{}) (*iamclientmodels.OauthmodelTokenResponseV3, 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 RefreshTokenRepository
- type Token
- type TokenRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertInterfaceToModel ¶
func ConvertInterfaceToModel(tokenInterface interface{}) (*iamclientmodels.OauthmodelTokenResponseV3, error)
    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 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
type TokenRepository ¶
type TokenRepository interface {
	// Store token model with type iamclientmodels.OauthmodelTokenResponseV3 or any type that compatible with its json serialized data
	Store(token interface{}) error
	GetToken() (*iamclientmodels.OauthmodelTokenResponseV3, error)
	RemoveToken() error
	TokenIssuedTimeUTC() time.Time
}
     Click to show internal directories. 
   Click to hide internal directories.