Documentation ¶
Index ¶
- func ComparePassword(userPassword string, password string) bool
- func HashPassword(password string) (string, error)
- func SignJWT(userID *string) (*string, error)
- func ValidateJWT(tokenString *string) (*string, error)
- type Claims
- type KakaoAccount
- type KakaoProfile
- type KakaoTokenPayload
- type KakaoUserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparePassword ¶
ComparePassword : compare the password
func HashPassword ¶
HashPassword : hashing the password
func ValidateJWT ¶
ValidateJWT : func to parse JWT and to return the identity
Types ¶
type KakaoAccount ¶
type KakaoAccount struct {
Profile KakaoProfile `json:"profile"`
}
type KakaoProfile ¶
type KakaoProfile struct {
Nickname *string `json:"nickname"`
}
type KakaoTokenPayload ¶
type KakaoTokenPayload struct {
AccessToken string `json:"access_token"`
}
type KakaoUserInfo ¶
type KakaoUserInfo struct { Id uint `json:"id"` KakaoAccount `json:"kakao_account"` }
func KakaoLogin ¶
func KakaoLogin(code string) (*KakaoUserInfo, error)
Click to show internal directories.
Click to hide internal directories.