Documentation
¶
Index ¶
- Constants
- type CreateRequest
- type DeleteRequest
- type GetRequest
- type Handler
- func (h *Handler) Create(c *app.Context, req CreateRequest) (api.Created[models.OAuthProvider], error)
- func (h *Handler) Delete(c *app.Context, req DeleteRequest) (api.StatusResponse, error)
- func (h *Handler) Get(c *app.Context, req GetRequest) (models.OAuthProvider, error)
- func (h *Handler) List(c *app.Context, _ api.EmptyRequest) ([]models.OAuthProvider, error)
- func (h *Handler) Update(c *app.Context, req UpdateRequest) (models.OAuthProvider, error)
- type UpdateRequest
Constants ¶
View Source
const SecretMask = "***"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
type CreateRequest struct {
Name string `json:"name" binding:"required,max=32"`
Protocol string `json:"protocol" binding:"max=16"`
DisplayName string `json:"display_name" binding:"max=64"`
Issuer string `json:"issuer" binding:"max=255"`
AuthorizationEndpoint string `json:"authorization_endpoint" binding:"required,max=512"`
TokenEndpoint string `json:"token_endpoint" binding:"required,max=512"`
UserinfoEndpoint string `json:"userinfo_endpoint" binding:"required,max=512"`
JWKSURI string `json:"jwks_uri" binding:"max=512"`
ClientID string `json:"client_id" binding:"required,max=255"`
ClientSecret string `json:"client_secret" binding:"required,max=255"`
Scopes string `json:"scopes" binding:"max=255"`
IconURL string `json:"icon_url" binding:"max=512"`
Enabled bool `json:"enabled"`
}
type DeleteRequest ¶
type DeleteRequest = api.IDPathRequest
type GetRequest ¶
type GetRequest = api.IDPathRequest
type Handler ¶
func (*Handler) Create ¶
func (h *Handler) Create(c *app.Context, req CreateRequest) (api.Created[models.OAuthProvider], error)
func (*Handler) Delete ¶
func (h *Handler) Delete(c *app.Context, req DeleteRequest) (api.StatusResponse, error)
func (*Handler) Get ¶
func (h *Handler) Get(c *app.Context, req GetRequest) (models.OAuthProvider, error)
func (*Handler) List ¶
func (h *Handler) List(c *app.Context, _ api.EmptyRequest) ([]models.OAuthProvider, error)
func (*Handler) Update ¶
func (h *Handler) Update(c *app.Context, req UpdateRequest) (models.OAuthProvider, error)
type UpdateRequest ¶
type UpdateRequest struct {
ID string `uri:"id" binding:"required"`
Fields map[string]any `json:"-"`
}
func (*UpdateRequest) SetBodyMap ¶
func (r *UpdateRequest) SetBodyMap(fields map[string]any)
Click to show internal directories.
Click to hide internal directories.