Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IService ¶
type IService interface { // ValidateOTP validate the given request that should have otp code inside. // Should always return false either for invalid token or any error in // order to verify the otp code. ValidateOTP(context.Context, *req.OTP) bool // GetJWT return the string encoded jwt token that's ready to be served to // response, also return error if any. GetJWT(context.Context) (string, error) }
IService an interface that should be used when dealing with otp.
func New ¶
func New(v *viper.Viper, l logger.Writer, repo otp_repository.IRepository) IService
New return new service that can be used to exchange otp code with a JWT that has validity based on the config.
Click to show internal directories.
Click to hide internal directories.