Documentation ¶
Index ¶
- type JWTCustomClaims
- type UserAuthService
- func (authService *UserAuthService) AddUserNote(c echo.Context) error
- func (authService *UserAuthService) GetUserNotes(c echo.Context) error
- func (authService *UserAuthService) Login(c echo.Context) error
- func (authService *UserAuthService) RestrictedPath(c echo.Context) error
- func (authService *UserAuthService) SignUp(c echo.Context) error
- type UserRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JWTCustomClaims ¶
type JWTCustomClaims struct { Username string `json:"username"` jwt.RegisteredClaims }
JWTCustomClaims are custom claims extending default ones.
type UserAuthService ¶
type UserAuthService struct {
// contains filtered or unexported fields
}
func NewUserAuthService ¶
func NewUserAuthService(secret string) *UserAuthService
func (*UserAuthService) AddUserNote ¶
func (authService *UserAuthService) AddUserNote(c echo.Context) error
AddUserNote adds a note belonging to the given user
func (*UserAuthService) GetUserNotes ¶
func (authService *UserAuthService) GetUserNotes(c echo.Context) error
GetUserNotes returns all the notes of a given user.
func (*UserAuthService) Login ¶
func (authService *UserAuthService) Login(c echo.Context) error
func (*UserAuthService) RestrictedPath ¶
func (authService *UserAuthService) RestrictedPath(c echo.Context) error
func (*UserAuthService) SignUp ¶
func (authService *UserAuthService) SignUp(c echo.Context) error
type UserRequest ¶
UserRequest represents a login or sign up request
Click to show internal directories.
Click to hide internal directories.