Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JWTAuth ¶
func JWTAuth(excludes ...string) core.MiddlewareHandler
JWTAuth an HTTP middleware that process login via JWT token.
Use:
app.Use(middleware.JWTAuth( prefixAPI+"/info", prefixAPI+"/auth/signin", prefixAPI+"/auth/refresh", ))
func SessionAuth ¶
func SessionAuth(excludes ...string) core.MiddlewareHandler
SessionAuth an HTTP middleware that process login via Session/Cookie token for API or Page requests.
Use:
apiRouter.Use(middleware.SessionAuth( prefixAPI+"/frontend/auth/signin", "/dang-nhap", ))
func SessionAuthPage ¶
SessionAuthPage an HTTP middleware that process login via Session/Cookie token.
Note:
- SessionAuthPage and SessionManipulation are used together if you want to have a full manual control user's session for a specific Handler.
Use:
groupUsers.GET("/profile", f.Apply(middleware.SessionAuthPage)(user.NewAccountPage()))
func SessionManipulation ¶
SessionManipulation an HTTP middleware that tries to process Session.
Note:
- Place first and before the webpage routers declarations
- SessionAuthPage and SessionManipulation are used together if you want to have a full manual control user's session for a specific Handler.
Use:
webRouter.Use(middleware.SessionManipulation)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.