Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Claims ¶
type Claims struct {
Username string `json:"username"`
Role string `json:"role"`
jwt.RegisteredClaims
}
Claims represents the JWT claims
func GetUserInfo ¶
GetUserInfo extracts user information from the JWT token
type TokenResponse ¶
type TokenResponse struct {
Token string `json:"token"`
RefreshToken string `json:"refreshToken"`
ExpiresAt int64 `json:"expiresAt"`
}
TokenResponse represents the response from the authentication endpoint
func Login ¶
func Login(username, password string) (*TokenResponse, error)
Login authenticates with the Synkronus API and returns a token
func RefreshToken ¶
func RefreshToken() (*TokenResponse, error)
RefreshToken refreshes the JWT token
Click to show internal directories.
Click to hide internal directories.