auth

package
v0.0.0-...-ff4c41b Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 8 Imported by: 0

README

Authentication and Authorization Service

Registration Flow:

  1. User enter email
  2. Send OTP to email
  3. User enter OTP
  4. Account Created, but not linked. Send auth token
  5. User Enter First Name And Last Name
  6. Fetch then select existing Profile, or Create New Person Profile
  7. Link account with Person Profile

Authentication Flow (username/password):

  1. User enter username & password
  2. receive auth token

Authentication Flow (email/otp):

  1. User enter email
  2. Send OTP to email
  3. User enter OTP
  4. Send Auth token

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthComponent

type AuthComponent interface {
	SignIn(ctx context.Context, input dto.SignInInput, output out.Output[dto.SignInResult])
	GenerateOtp(ctx context.Context, input dto.OtpInput, output out.Output[dto.OtpResult])
	CompleteRegistration(ctx context.Context, input dto.CompleteRegistrationInput, output out.Output[dto.AuthData])
	Auth(ctx context.Context, input dto.AuthInput, output out.Output[dto.AuthData])
	ResetPassword(ctx context.Context, input dto.PasswordResetInput, output out.Output[dto.PasswordResult])
	GenerateResetToken(ctx context.Context, email string, output out.Output[dto.PasswordResetCodeResult])
	common.Component
}

func NewAuthComponent

func NewAuthComponent(component AuthDataLayerComponent, secretKey []byte) AuthComponent

type AuthDataLayerComponent

type AuthDataLayerComponent interface {
	CommandWorker() worker.UnitOfWork[commands.CommandContext]
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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