authentication

package
v0.0.0-...-d22e7c3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

README

Authentication

Authentication usecase handle all authentication request for the project.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Usecase

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

Usecase of authentication

func New

func New(stateUsecase stateUsecase, otpUsecase otpUsecase) *Usecase

New authentication usecase

func (*Usecase) Authenticate

func (u *Usecase) Authenticate(ctx context.Context, username string, action authentity.Action, provider authentity.Provider, metadata map[string]string) (string, error)

Authenticate for trying to authenticate

func (*Usecase) Confirm

func (u *Usecase) Confirm(ctx context.Context, username, password, stateID string) error

Confirm for confirming the authenticating user request

func (*Usecase) IsAuthenticated

func (u *Usecase) IsAuthenticated(ctx context.Context, username, stateID string, action authentity.Action) (bool, error)

IsAuthenticated to check whether state is used and authenticated for particular username

func (*Usecase) ResendCode

func (u *Usecase) ResendCode(ctx context.Context, stateID string) error

ResendCode for resend the code that used for authentication for example the OTP code

Jump to

Keyboard shortcuts

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