auth

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComparePassword

func ComparePassword(password string, hash string) error

func HashPassword

func HashPassword(password string) (string, error)

HashPassword hashes the password using bcrypt.

func NewLocalPasswordAuthenticator

func NewLocalPasswordAuthenticator(
	userRepository core.UserRepository,
	twoFactorService core.TwoFactorAuthService,
) *localPasswordAuthenticator

func NewSessionCleaner

func NewSessionCleaner(
	sessions core.SessionRepository,
	clock core.Clock,
	interval time.Duration,
	inactiveLifetime time.Duration,
	lifetime time.Duration,
) *sessionCleaner

func NewSessionManager

func NewSessionManager(
	sessionRepository core.SessionRepository,
	clock core.Clock,
	inactiveLifetime time.Duration,
	lifetime time.Duration,
	tokenRotationInterval time.Duration,
) core.SessionManager

func NewTokenService

func NewTokenService(tokenRepository core.TokenRepository) core.TokenService

func NewTwoFactorAuthService

func NewTwoFactorAuthService(
	twoFactorSettingsRepository core.TwoFactorSettingsRepository,
	userRepository core.UserRepository,
	cfg *config.TOTPConfig,
) core.TwoFactorAuthService

Types

This section is empty.

Jump to

Keyboard shortcuts

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