Documentation ¶
Index ¶
- func Refresh(maxCtxDuration time.Duration, svc *service.Service) (handler gin.HandlerFunc)
- func SignIn(maxCtxDuration time.Duration, svc *service.Service) (handler gin.HandlerFunc)
- func SignOut(maxCtxDuration time.Duration, svc *service.Service) (handler gin.HandlerFunc)
- func SignUp(maxCtxDuration time.Duration, svc *service.Service) (handler gin.HandlerFunc)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Refresh ¶
@Tags Authentication @Summary Refresh @Description Request new access token using refresh token. @Router /v1/refresh [post] @Produce application/json @Produce application/msgpack @Header 200 {string} Set-Cookie @Success 200 {object} object{data=object{tokenType=string,accessToken=string}} @Success 201 @Failure 401 {object} object{message=string} @Failure 500 {object} object{message=string}
func SignIn ¶
@Tags Authentication @Summary Sign In @Description Do the signing in request. @Router /v1/signin [post] @Accept application/json @Accept application/msgpack @Produce application/json @Produce application/msgpack @Param form body object{username=string,password=string} true "Login form" @Header 200 {string} Set-Cookie @Success 200 {object} object{data=object{tokenType=string,accessToken=string}} @Failure 401 {object} object{message=string} @Failure 422 {object} object{message=string} @Failure 500 {object} object{message=string}
func SignOut ¶
@Tags Authentication @Summary Sign Out @Description Do the signing out request to revoke access token & refresh token. @Router /v1/signout [post] @Security BearerAuth @Produce application/json @Produce application/msgpack @Header 200 {string} Set-Cookie @Success 201 @Failure 401 {object} object{message=string} @Failure 500 {object} object{message=string}
Types ¶
This section is empty.