v2: fixed oauth errors, oauth clients native control added
This commit is contained in:
@@ -45,6 +45,22 @@ type AuthorizationCodeRow struct {
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
}
|
||||
|
||||
type ClientCreateInput struct {
|
||||
Name string `json:"name" binding:"required,min=2,max=128"`
|
||||
RedirectURIs []string `json:"redirect_uris" binding:"required,min=1,dive,url"`
|
||||
GrantTypes []string `json:"grant_types" binding:"required,min=1,dive,oneof=authorization_code refresh_token"`
|
||||
Scopes []string `json:"scopes" binding:"required,min=1,dive,min=1"`
|
||||
}
|
||||
|
||||
type ClientUpdateInput struct {
|
||||
Name *string `json:"name" binding:"omitempty,min=2,max=128"`
|
||||
RedirectURIs *[]string `json:"redirect_uris" binding:"omitempty,min=1,dive,url"`
|
||||
GrantTypes *[]string `json:"grant_types" binding:"omitempty,min=1,dive,oneof=authorization_code refresh_token"`
|
||||
Scopes *[]string `json:"scopes" binding:"omitempty,min=1,dive,min=1"`
|
||||
Trusted *bool `json:"trusted"`
|
||||
IsActive *bool `json:"is_active"`
|
||||
}
|
||||
|
||||
type UserConsent struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
UserID uuid.UUID `json:"-"`
|
||||
|
||||
Reference in New Issue
Block a user