Documentation
¶
Index ¶
Constants ¶
View Source
const MaxRSSItemCount = 100
View Source
const MaxRSSItemTitleLength = 100
View Source
const (
MebiByte = 1024 * 1024
)
Variables ¶
This section is empty.
Functions ¶
func GenerateTokensAndSetCookies ¶ added in v0.12.0
GenerateTokensAndSetCookies generates jwt token and saves it to the http-only cookie.
func JWTMiddleware ¶ added in v0.12.0
JWTMiddleware validates the access token. If the access token is about to expire or has expired and the request has a valid refresh token, it will try to generate new access token and refresh token.
func RemoveTokensAndCookies ¶ added in v0.12.0
func RemoveTokensAndCookies(c echo.Context)
RemoveTokensAndCookies removes the jwt token and refresh token from the cookies.
Types ¶
type Claims ¶ added in v0.12.0
type Claims struct { Name string `json:"name"` jwt.RegisteredClaims }
Claims creates a struct that will be encoded to a JWT. We add jwt.RegisteredClaims as an embedded type, to provide fields such as name.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.