Documentation
¶
Index ¶
- Constants
- func DecodeId(hashId string) (int, error)
- func EncodeId(id int) string
- func GetTokenFromAuthHeader(authHeader string, headerType string) (string, error)
- func Initialize(config *config.Config) error
- func InitializeHashId(config *config.Config) error
- func InitializeJWT(config *config.Config)
- func VerifyLoginJWT(authHeader string) (int, error)
- type Claims
- type JWT
- type TokenResponse
- type Utils
Constants ¶
View Source
const (
HeaderBearerType = "Bearer"
)
Variables ¶
This section is empty.
Functions ¶
func GetTokenFromAuthHeader ¶
func Initialize ¶
func InitializeHashId ¶
func InitializeJWT ¶
func VerifyLoginJWT ¶
Types ¶
type Claims ¶
type Claims struct {
Email string `json:"email"`
jwt.StandardClaims
}
type TokenResponse ¶
type TokenResponse struct {
Token string `json:"token"`
}
func CreateLoginJWT ¶
func CreateLoginJWT(email string) (*TokenResponse, error)
Click to show internal directories.
Click to hide internal directories.