44 lines
1.0 KiB
Go
44 lines
1.0 KiB
Go
package entities
|
|
|
|
type LoginRequest struct {
|
|
Email string `json:"email"`
|
|
Password string `json:"password"`
|
|
}
|
|
|
|
type RegisterRequest struct {
|
|
Email string `json:"email"`
|
|
Password string `json:"password"`
|
|
}
|
|
|
|
type TokenPair struct {
|
|
AccessToken string `json:"access_token"`
|
|
RefreshToken string `json:"refresh_token"`
|
|
}
|
|
|
|
type AccessTokenClaims struct {
|
|
UserID string `json:"user_id"`
|
|
Email string `json:"email"`
|
|
Exp int64 `json:"exp"`
|
|
}
|
|
|
|
type RefreshTokenClaims struct {
|
|
UserID string `json:"user_id"`
|
|
Exp int64 `json:"exp"`
|
|
}
|
|
|
|
type TokenRequest struct {
|
|
RefreshToken string `json:"refresh_token"`
|
|
}
|
|
|
|
type TelegramAuthRequest struct {
|
|
TelegramID int64 `json:"telegram_id"`
|
|
Username string `json:"username"`
|
|
FirstName string `json:"first_name"`
|
|
LastName string `json:"last_name"`
|
|
AuthDate int64 `json:"auth_date"`
|
|
Hash string `json:"hash"`
|
|
PhotoURL string `json:"photo_url,omitempty"`
|
|
AccessToken string `json:"access_token,omitempty"`
|
|
RefreshToken string `json:"refresh_token,omitempty"`
|
|
}
|