factories

package
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationFactory

type AuthenticationFactory interface {
	CreateProjectAuthenticator(apiKey, apiSecret string) Authenticator
	CreateUserAuthenticator(apiKey, token string, identityFactory Identity) Authenticator
}

type Authenticator

type Authenticator interface {
	Authenticate(ctx context.Context) (*authentication.Authentication, error)
}

type EncryptionFactory

type EncryptionFactory interface {
	CreateEncryptionKeyBuilder(builderType EncryptionKeyBuilderType, projectMigrated bool) (builders.EncryptionKeyBuilder, error)
	CreateReconstructionStrategy(projectMigrated bool) strategies.ReconstructionStrategy
	CreateEncryptionStrategy(key string) strategies.EncryptionStrategy
}

type EncryptionKeyBuilderType

type EncryptionKeyBuilderType int8
const (
	Plain EncryptionKeyBuilderType = iota
	Session
)

type Identity

type Identity interface {
	GetProviderID() string
	Identify(ctx context.Context, token string) (string, error)
}

type IdentityFactory

type IdentityFactory interface {
	CreateCustomIdentity(ctx context.Context, apiKey string) (Identity, error)
	CreateOpenfortIdentity(ctx context.Context, apiKey string, authenticationProvider, tokenType *string) (Identity, error)
}

Jump to

Keyboard shortcuts

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