tokencache

package
v0.0.0-...-a01d22e Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCacheManager

func CreateCacheManager(storageManager IStorageManager) msalbase.ICacheManager

Types

type AppMetadata

type AppMetadata struct {
	Environment string
	ClientID    string
	FamilyID    string
}

type ICacheKeyGenerator

type ICacheKeyGenerator interface {
	GetAccessTokenKey(accessTokenCacheItem) string
	GetRefreshTokenKey(refreshTokenCacheItem) string
	GetIDTokenKey(idTokenCacheItem) string
	GetAccountKey(accountCacheItem) string
}

type IStorageManager

type IStorageManager interface {
	ReadCredentials(
		correlationID string,
		homeAccountID string,
		environment string,
		realm string,
		clientID string,
		familyID string,
		target string,
		types map[msalbase.CredentialType]bool) (*ReadCredentialsResponse, error)

	WriteCredentials(correlationID string, credentials []*msalbase.Credential) (*OperationStatus, error)

	DeleteCredentials(
		correlationId string,
		homeAccountId string,
		environment string,
		realm string,
		clientID string,
		familyID string,
		target string,
		types map[msalbase.CredentialType]bool) (*OperationStatus, error)

	ReadAllAccounts(correlationID string) (*ReadAccountsResponse, error)

	ReadAccount(
		correlationID string,
		homeAccountID string,
		environment string,
		realm string) (*ReadAccountResponse, error)

	WriteAccount(correlationID string, account *msalbase.Account) (*OperationStatus, error)

	DeleteAccount(
		correlationID string,
		homeAccountID string,
		environment string,
		realm string) (*OperationStatus, error)

	DeleteAccounts(correlationID string, homeAccountID string, environment string) (*OperationStatus, error)
	ReadAppMetadata(environment string, clientID string) (*AppMetadata, error)
	WriteAppMetadata(appMetadata *AppMetadata) error
}

func CreateStorageManager

func CreateStorageManager() IStorageManager

type OperationStatus

type OperationStatus struct {
	StatusType        OperationStatusType
	Code              int
	StatusDescription string
	PlatformCode      int
	PlatformDomain    string
}

func CreateSuccessOperationStatus

func CreateSuccessOperationStatus() *OperationStatus

type OperationStatusType

type OperationStatusType int
const (
	OperationStatusTypeSuccess OperationStatusType = iota
	OperationStatusTypeFailure
	OperationStatusTypeRetriableError
)

type ReadAccountResponse

type ReadAccountResponse struct {
	Account         *msalbase.Account
	OperationStatus *OperationStatus
}

type ReadAccountsResponse

type ReadAccountsResponse struct {
	Accounts        []*msalbase.Account
	OperationStatus *OperationStatus
}

type ReadCredentialsResponse

type ReadCredentialsResponse struct {
	Credentials     []*msalbase.Credential
	OperationStatus *OperationStatus
}

Jump to

Keyboard shortcuts

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