feat: service/controller prototype
This commit is contained in:
24
backend/internal/models/auth.go
Normal file
24
backend/internal/models/auth.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package models
|
||||
|
||||
type Tokens struct {
|
||||
AccessToken string `json:"access_token"`
|
||||
RefreshToken string `json:"refresh_token"`
|
||||
}
|
||||
|
||||
type LoginRequest struct {
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
TOTP *string `json:"totp"`
|
||||
}
|
||||
|
||||
type LoginResponse struct {
|
||||
Tokens
|
||||
}
|
||||
|
||||
type RefreshRequest struct {
|
||||
RefreshToken string `json:"refresh_token"`
|
||||
}
|
||||
|
||||
type RefreshResponse struct {
|
||||
Tokens
|
||||
}
|
||||
Reference in New Issue
Block a user