Documentation ¶
Index ¶
- type Usecase
- func (u *Usecase) Authenticate(ctx context.Context, username string, action authentity.Action, ...) (string, error)
- func (u *Usecase) Confirm(ctx context.Context, username, password, stateID string) error
- func (u *Usecase) IsAuthenticated(ctx context.Context, username, stateID string, action authentity.Action) (bool, error)
- func (u *Usecase) ResendCode(ctx context.Context, stateID string) error
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) 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
Click to show internal directories.
Click to hide internal directories.