Documentation
¶
Index ¶
- type Client
- type CreateClientRequest
- type CreateClientResponse
- type Handler
- func (h *Handler) Create(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Delete(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Get(w http.ResponseWriter, r *http.Request)
- func (h *Handler) List(w http.ResponseWriter, r *http.Request)
- func (h *Handler) RotateSecret(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Routes() chi.Router
- type Service
- func (s *Service) Create(ctx context.Context, req CreateClientRequest) (*CreateClientResponse, error)
- func (s *Service) Delete(ctx context.Context, id string) error
- func (s *Service) GetByID(ctx context.Context, id string) (*Client, error)
- func (s *Service) List(ctx context.Context, limit, offset int) ([]Client, int64, error)
- func (s *Service) RotateSecret(ctx context.Context, id string) (string, error)
- type UpdateClientRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
ID string `json:"id"`
Name string `json:"name"`
RedirectURIs []string `json:"redirect_uris"`
GrantTypes []string `json:"grant_types"`
ResponseTypes []string `json:"response_types"`
Scopes []string `json:"scopes"`
Audience []string `json:"audience"`
Public bool `json:"public"`
TokenEndpointAuthMethod string `json:"token_endpoint_auth_method"`
Metadata map[string]interface{} `json:"metadata"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type CreateClientRequest ¶
type CreateClientRequest struct {
Name string `json:"name" validate:"required"`
RedirectURIs []string `json:"redirect_uris"`
GrantTypes []string `json:"grant_types"`
ResponseTypes []string `json:"response_types"`
Scopes []string `json:"scopes"`
Audience []string `json:"audience"`
Public bool `json:"public"`
TokenEndpointAuthMethod string `json:"token_endpoint_auth_method"`
Metadata map[string]interface{} `json:"metadata"`
}
type CreateClientResponse ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) RotateSecret ¶
func (h *Handler) RotateSecret(w http.ResponseWriter, r *http.Request)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) Create ¶
func (s *Service) Create(ctx context.Context, req CreateClientRequest) (*CreateClientResponse, error)
type UpdateClientRequest ¶
Click to show internal directories.
Click to hide internal directories.