Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultClaimsKey = "payload"
View Source
const DefaultUserKey = "user"
DefaultUserKey user
Variables ¶
View Source
var ( // ErrTokenMissing is the error value that it's returned when // a token is not found based on the token extractor. ErrTokenMissing = errors.New("this api requires authorization token") // ErrUserIDMissing is the error value when no user id found in jwt token ErrUserIDMissing = errors.New("authorization token missing user id") )
Functions ¶
func ErrorHandler ¶
func ErrorHandler(ctx iris.Context, err error)
ErrorHandler is the default error handler. Use it to change the behavior for each error.
func IsAuthenticated ¶
func IsAuthenticated(ctx iris.Context)
IsAuthenticated is authentication middleware
Types ¶
Click to show internal directories.
Click to hide internal directories.