redis

package
v0.0.0-...-4f5e8d6 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DependencySet = wire.NewSet(
	NewLogger,
	wire.Struct(new(Store), "*"),
)

Functions

This section is empty.

Types

type Logger

type Logger struct{ *log.Logger }

func NewLogger

func NewLogger(lf *log.Factory) Logger

type Store

type Store struct {
	Redis       *appredis.Handle
	AppID       config.AppID
	Logger      Logger
	SQLBuilder  *appdb.SQLBuilderApp
	SQLExecutor *appdb.SQLExecutor
	Clock       clock.Clock
}

func (*Store) AddOfflineGrantRefreshToken

func (s *Store) AddOfflineGrantRefreshToken(
	ctx context.Context,
	grantID string,
	expireAt time.Time,
	tokenHash string,
	clientID string,
	scopes []string,
	authorizationID string,
	dpopJKT string,
) (*oauth.OfflineGrant, error)

func (*Store) AddOfflineGrantSAMLServiceProviderParticipant

func (s *Store) AddOfflineGrantSAMLServiceProviderParticipant(
	ctx context.Context,
	grantID string,
	newServiceProviderID string,
	expireAt time.Time) (*oauth.OfflineGrant, error)

func (*Store) CleanUpForDeletingUserID

func (s *Store) CleanUpForDeletingUserID(ctx context.Context, userID string) (err error)

func (*Store) ConsumePreAuthenticatedURLToken

func (s *Store) ConsumePreAuthenticatedURLToken(ctx context.Context, tokenHash string) (*oauth.PreAuthenticatedURLToken, error)

func (*Store) CreateAccessGrant

func (s *Store) CreateAccessGrant(ctx context.Context, grant *oauth.AccessGrant) error

func (*Store) CreateAppSession

func (s *Store) CreateAppSession(ctx context.Context, session *oauth.AppSession) error

func (*Store) CreateAppSessionToken

func (s *Store) CreateAppSessionToken(ctx context.Context, token *oauth.AppSessionToken) error

func (*Store) CreateCodeGrant

func (s *Store) CreateCodeGrant(ctx context.Context, grant *oauth.CodeGrant) error

func (*Store) CreateOfflineGrant

func (s *Store) CreateOfflineGrant(ctx context.Context, grant *oauth.OfflineGrant) error

func (*Store) CreatePreAuthenticatedURLToken

func (s *Store) CreatePreAuthenticatedURLToken(ctx context.Context, token *oauth.PreAuthenticatedURLToken) error

func (*Store) CreateSettingsActionGrant

func (s *Store) CreateSettingsActionGrant(ctx context.Context, grant *oauth.SettingsActionGrant) error

func (*Store) DeleteAccessGrant

func (s *Store) DeleteAccessGrant(ctx context.Context, grant *oauth.AccessGrant) error

func (*Store) DeleteAppSession

func (s *Store) DeleteAppSession(ctx context.Context, session *oauth.AppSession) error

func (*Store) DeleteAppSessionToken

func (s *Store) DeleteAppSessionToken(ctx context.Context, token *oauth.AppSessionToken) error

func (*Store) DeleteCodeGrant

func (s *Store) DeleteCodeGrant(ctx context.Context, grant *oauth.CodeGrant) error

func (*Store) DeleteOfflineGrant

func (s *Store) DeleteOfflineGrant(ctx context.Context, grant *oauth.OfflineGrant) error

func (*Store) DeleteSettingsActionGrant

func (s *Store) DeleteSettingsActionGrant(ctx context.Context, grant *oauth.SettingsActionGrant) error

func (*Store) GetAccessGrant

func (s *Store) GetAccessGrant(ctx context.Context, tokenHash string) (*oauth.AccessGrant, error)

func (*Store) GetAppSession

func (s *Store) GetAppSession(ctx context.Context, tokenHash string) (*oauth.AppSession, error)

func (*Store) GetAppSessionToken

func (s *Store) GetAppSessionToken(ctx context.Context, tokenHash string) (*oauth.AppSessionToken, error)

func (*Store) GetCodeGrant

func (s *Store) GetCodeGrant(ctx context.Context, codeHash string) (*oauth.CodeGrant, error)

func (*Store) GetOfflineGrantWithoutExpireAt

func (s *Store) GetOfflineGrantWithoutExpireAt(ctx context.Context, id string) (*oauth.OfflineGrant, error)

func (*Store) GetSettingsActionGrant

func (s *Store) GetSettingsActionGrant(ctx context.Context, codeHash string) (*oauth.SettingsActionGrant, error)

func (*Store) ListClientOfflineGrants

func (s *Store) ListClientOfflineGrants(ctx context.Context, clientID string, userID string) ([]*oauth.OfflineGrant, error)

func (*Store) ListOfflineGrants

func (s *Store) ListOfflineGrants(ctx context.Context, userID string) ([]*oauth.OfflineGrant, error)

func (*Store) RemoveOfflineGrantRefreshTokens

func (s *Store) RemoveOfflineGrantRefreshTokens(ctx context.Context, grantID string, tokenHashes []string, expireAt time.Time) (*oauth.OfflineGrant, error)

func (*Store) UpdateOfflineGrantApp2AppDeviceKey

func (s *Store) UpdateOfflineGrantApp2AppDeviceKey(ctx context.Context, grantID string, newKey string, expireAt time.Time) (*oauth.OfflineGrant, error)

func (*Store) UpdateOfflineGrantAuthenticatedAt

func (s *Store) UpdateOfflineGrantAuthenticatedAt(ctx context.Context, grantID string, authenticatedAt time.Time, expireAt time.Time) (*oauth.OfflineGrant, error)

func (*Store) UpdateOfflineGrantDeviceInfo

func (s *Store) UpdateOfflineGrantDeviceInfo(ctx context.Context, grantID string, deviceInfo map[string]interface{}, expireAt time.Time) (*oauth.OfflineGrant, error)

func (*Store) UpdateOfflineGrantDeviceSecretHash

func (s *Store) UpdateOfflineGrantDeviceSecretHash(
	ctx context.Context,
	grantID string,
	newDeviceSecretHash string,
	dpopJKT string,
	expireAt time.Time) (*oauth.OfflineGrant, error)

func (*Store) UpdateOfflineGrantLastAccess

func (s *Store) UpdateOfflineGrantLastAccess(ctx context.Context, grantID string, accessEvent access.Event, expireAt time.Time) (*oauth.OfflineGrant, error)

UpdateOfflineGrantLastAccess updates the last access event for an offline grant

Jump to

Keyboard shortcuts

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