omada-api/model/login.go
2025-02-01 17:38:29 +01:00

27 lines
676 B
Go

package model
type LoginRequest struct {
Username string `json:"username"`
Password string `json:"password"`
}
type LoginResponse Response[LoginResponseResult]
type LoginResponseResult struct {
CsrfToken string `json:"csrfToken"`
SessionID string `json:"sessionId"`
}
type AuthCodeResponse struct {
ErrorCode int `json:"errorCode"`
Message string `json:"msg"`
Result *string `json:"result"`
}
type AuthTokenResponse Response[AuthTokenResponseResult]
type AuthTokenResponseResult struct {
AccessToken string `json:"accessToken"`
TokenType string `json:"tokenType"`
ExpiresIn int `json:"expiresIn"`
RefreshToken string `json:"refreshToken"`
}