aboutsummaryrefslogtreecommitdiffstats
path: root/api/dto/auth.go
blob: 734bb31f8fbbfbc875756d920ae270997844ec1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package dto

type LoginBasicRequest struct {
	Username string `json:"username" validate:"required"`
	Password string `json:"password" validate:"required"`
}

type LoginOAuthCallbackRequest struct {
	Code  string `json:"code" validate:"required"`
	State string `json:"state" validate:"required"`
}

type LoginOAuthOutboundResponse struct {
	URL string `json:"url"`
}

type LoginResponse struct {
	ID       int32  `json:"id"`
	Token    string `json:"token"`
	Username string `json:"username"`
	Admin    bool   `json:"admin"`
}

type LoginOptionsResponse struct {
	Options []LoginOption `json:"options"`
}

type LoginOption struct {
	Name       string `json:"name"`
	Identifier string `json:"identifier"`
	Type       string `json:"type"`
}