Documentation ¶
Index ¶
- Constants
- Variables
- type JWTScopeClaims
- type ServiceMesh
- type UserAuthenticationService
- func (obj *UserAuthenticationService) EmailIsValid(email string) bool
- func (obj *UserAuthenticationService) GenerateJWT(user *queries.User) (string, error)
- func (obj *UserAuthenticationService) HashPassword(password string) (string, error)
- func (obj *UserAuthenticationService) PasswordIsValid(password string) bool
- func (obj *UserAuthenticationService) PasswordMatchesUserPassword(passwordHash, password string) bool
- func (obj *UserAuthenticationService) Signin(ctx context.Context, email, password string) (string, error)
- func (obj *UserAuthenticationService) Signup(ctx context.Context, email string, password string) (*queries.User, error)
- func (obj *UserAuthenticationService) UserFromEchoContext(echoCtx echo.Context) (*queries.User, error)
Constants ¶
View Source
const TOKEN_DURATION time.Duration = time.Minute * 30
Variables ¶
View Source
var ErrEmailTaken error = errors.New("ErrEmailTaken")
View Source
var ErrInvalidPassword error = errors.New("ErrInvalidPassword")
View Source
var ErrInvalidToken error = errors.New("ErrInvalidToken")
View Source
var ErrParsingJWTToken error = errors.New("ErrParsingJWTToken")
View Source
var ErrPasswordIncorrect error = errors.New("ErrPasswordIncorrect")
Functions ¶
This section is empty.
Types ¶
type JWTScopeClaims ¶
type ServiceMesh ¶
type ServiceMesh struct { UserAuthenticationService UserAuthenticationService // contains filtered or unexported fields }
func NewServiceMesh ¶
type UserAuthenticationService ¶
type UserAuthenticationService struct {
// contains filtered or unexported fields
}
func (*UserAuthenticationService) EmailIsValid ¶
func (obj *UserAuthenticationService) EmailIsValid(email string) bool
func (*UserAuthenticationService) GenerateJWT ¶
func (obj *UserAuthenticationService) GenerateJWT(user *queries.User) (string, error)
func (*UserAuthenticationService) HashPassword ¶
func (obj *UserAuthenticationService) HashPassword(password string) (string, error)
func (*UserAuthenticationService) PasswordIsValid ¶
func (obj *UserAuthenticationService) PasswordIsValid(password string) bool
func (*UserAuthenticationService) PasswordMatchesUserPassword ¶
func (obj *UserAuthenticationService) PasswordMatchesUserPassword(passwordHash, password string) bool
func (*UserAuthenticationService) UserFromEchoContext ¶
func (obj *UserAuthenticationService) UserFromEchoContext(echoCtx echo.Context) (*queries.User, error)
Click to show internal directories.
Click to hide internal directories.