Documentation ¶
Index ¶
- func CurrentAuthUserId(ctx echo.Context) (uint64, error)
- func CurrentUser(ctx echo.Context) uint64
- func CurrentUserId(ctx echo.Context) uint64
- func CurrentVisitor(ctx echo.Context) (uint64, error)
- func DecryptAES(key []byte, text string) string
- func EncryptAES(key []byte, text string) string
- func MakeJWTToken(userID uint64) (string, error)
- func NewJWTMiddleware(secret string) echo.MiddlewareFunc
- func NewTokenMiddleware(secret string) echo.MiddlewareFunc
- func Pad(src []byte) []byte
- func SetAuthCookie(c echo.Context, token string)
- func Unpad(src []byte) ([]byte, error)
- type JWTClaims
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentAuthUserId ¶
func CurrentUser ¶
func CurrentUser(ctx echo.Context) uint64
func CurrentUserId ¶
func CurrentUserId(ctx echo.Context) uint64
func CurrentVisitor ¶
func DecryptAES ¶
func EncryptAES ¶
func MakeJWTToken ¶
func NewJWTMiddleware ¶
func NewJWTMiddleware(secret string) echo.MiddlewareFunc
func NewTokenMiddleware ¶
func NewTokenMiddleware(secret string) echo.MiddlewareFunc
func SetAuthCookie ¶
func SetAuthCookie(c echo.Context, token string)
Types ¶
type JWTClaims ¶
type JWTClaims struct { UserID uint64 jwt.StandardClaims }
Click to show internal directories.
Click to hide internal directories.