Documentation
¶
Index ¶
- func GenerateAuthCode(userId, joinCode string) (authCode string)
- func GenerateKeys(authCode string, pubkey ed25519.PublicKey, privkey ed25519.PrivateKey) (encodedSignature, base64PublicKey string)
- func GenerateToken(userId, authCode, encodedSignature, base64PublicKey string) (token string)
- func Logout()
- func ValidateToken(accessToken string) (status bool)
- type AuthCodeStruct
- type TokenStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateAuthCode ¶
Generate auth code
func GenerateKeys ¶
func GenerateKeys(authCode string, pubkey ed25519.PublicKey, privkey ed25519.PrivateKey) (encodedSignature, base64PublicKey string)
Generate Encoded signature and base64 public key
func GenerateToken ¶
Generate accessToken, refreshToken
func ValidateToken ¶
validate access token, if its active
Types ¶
type AuthCodeStruct ¶
type AuthCodeStruct struct {
AuthCode string `json:"authCode"`
}
type TokenStruct ¶
type TokenStruct struct { AccessToken string `json:"accessToken"` RefreshToken string `json:"refreshToken"` AccessTokenExpires int `json:"accessTokenExpires"` RefreshTokenExpires int `json:"refreshTokenExpires"` }
func RefreshToken ¶
func RefreshToken(refreshToken string) (tokenStruct TokenStruct, status bool)
Get new accesstoken and refreshToken from provided `refreshToken`
Click to show internal directories.
Click to hide internal directories.