Documentation ¶
Index ¶
- Constants
- func BaseAuth(next http.Handler) http.Handler
- func CheckRequestID(next http.Handler) http.Handler
- func GenerateToken(userName string, password string) (string, error)
- func MethodNotAllowed(w http.ResponseWriter, req *http.Request)
- func NotFound(w http.ResponseWriter, req *http.Request)
- func Recoverer(next http.Handler) http.Handler
- type JWT
- type PaddleFlowClaims
Constants ¶
View Source
const SECERTKEY = "its my precious"
View Source
const UserNameParam = "userName"
Variables ¶
This section is empty.
Functions ¶
func MethodNotAllowed ¶
func MethodNotAllowed(w http.ResponseWriter, req *http.Request)
Types ¶
type JWT ¶
type JWT struct {
Sigkey []byte
}
func (*JWT) CreateToken ¶
func (j *JWT) CreateToken(claim PaddleFlowClaims) (string, error)
func (*JWT) ParseToken ¶
func (j *JWT) ParseToken(tokenString string) (*PaddleFlowClaims, error)
type PaddleFlowClaims ¶
type PaddleFlowClaims struct { UserName string `json:"username"` Password string `json:"password"` jwtgo.StandardClaims }
Click to show internal directories.
Click to hide internal directories.