Documentation ¶
Index ¶
- Constants
- func CreateCookie(name, value string, ttl int64) *http.Cookie
- func CreateHTTPOnlyCookie(name, value string, ttl int64) *http.Cookie
- func GenerateAuthToken(atw *AuthTokenWrapper) (string, error)
- func GenerateCSRFToken(userID string) (string, error)
- func GetLimitArray(array *[]string, limit, page int64) ([]string, int64, int64)
- func GetLimitMessage(array *[]core.Message, limit, page int64) ([]core.Message, int64, int64)
- func IsLarge(res bool) int64
- func RefreshIfNeededCSRFToken(token string, userID string) (string, error)
- type AuthTokenWrapper
Constants ¶
View Source
const ( ViperJWTTTLKey = "service.jwt_ttl" ViperJWTSecretKey = "service.jwt_secret" )
Variables ¶
This section is empty.
Functions ¶
func GenerateAuthToken ¶
func GenerateAuthToken(atw *AuthTokenWrapper) (string, error)
func GenerateCSRFToken ¶
func GetLimitArray ¶
func GetLimitMessage ¶
Types ¶
type AuthTokenWrapper ¶
type AuthTokenWrapper struct { UserID string `json:"user_id"` jwt.StandardClaims }
Click to show internal directories.
Click to hide internal directories.