auth

package
v0.0.0-...-ad95247 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JWKSetManager

type JWKSetManager struct {
	KeySet jwk.Set
}

func NewJWKSetManager

func NewJWKSetManager() *JWKSetManager

func (*JWKSetManager) AddKey

func (m *JWKSetManager) AddKey(kid string) error

func (*JWKSetManager) MarshalJSON

func (m *JWKSetManager) MarshalJSON() ([]byte, error)

func (*JWKSetManager) RemoveKey

func (m *JWKSetManager) RemoveKey(kid string) error

func (*JWKSetManager) Set

func (m *JWKSetManager) Set() jwk.Set

func (*JWKSetManager) UnmarshalJSON

func (m *JWKSetManager) UnmarshalJSON(bytes []byte) error

type JWTBuilder

type JWTBuilder struct {
	Clock      ports.Clock
	KeySet     jwk.Set
	DefaultKid string
	Params     JWTTokenParams
}

func (JWTBuilder) Build

func (b JWTBuilder) Build(session *ports.Session) ([]byte, error)

type JWTTokenParams

type JWTTokenParams struct {
	Issuer   string
	Audience []string
}

type LoginManager

type LoginManager struct {
	// contains filtered or unexported fields
}

func NewLoginManager

func NewLoginManager(
	userRepo ports.UserReadRepository,
	identityOpener ports.IdentityOpener,
	identitySessionSealer ports.IdentitySealer,
	sessionStore ports.SessionStore,
) *LoginManager

func (LoginManager) AuthenticateWithPassword

func (l LoginManager) AuthenticateWithPassword(ctx context.Context, userMail string, password []byte) (*ports.AuthenticationResult, error)

type RegistrationManager

type RegistrationManager struct {
	InvitesRepository ports.UserInvitesReadRepository
	UserRepository    ports.UserWriteRepository
	BucketsRepository ports.BucketsWriteRepository
	Validator         ports.KeyValidator
	IdentitySealer    ports.IdentitySealer
}

func NewRegistrationManager

func NewRegistrationManager(
	invitesRepository ports.UserInvitesReadRepository,
	userRepository ports.UserWriteRepository,
	bucketsRepository ports.BucketsWriteRepository,
	validator ports.KeyValidator,
	identitySealer ports.IdentitySealer,
) *RegistrationManager

func (RegistrationManager) RegisterUser

Jump to

Keyboard shortcuts

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