Documentation ¶
Index ¶
- Constants
- Variables
- type Filter
- type Handler
- func (h *Handler) Create(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func (h *Handler) Delete(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (h *Handler) Get(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (h *Handler) List(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (h *Handler) Patch(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (h *Handler) SetRoutes(admin *helpers.RouterAdmin)
- func (h *Handler) Update(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- type InternalRegistry
- type Manager
- type Registry
- type Storage
- type Validator
Constants ¶
const (
ClientsHandlerPath = "/clients"
)
Variables ¶
var ErrInvalidClientMetadata = &fosite.RFC6749Error{ DescriptionField: "The value of one of the Client Metadata fields is invalid and the server has rejected this request. Note that an Authorization Server MAY choose to substitute a valid value for any requested parameter of a Client's Metadata.", ErrorField: "invalid_client_metadata", CodeField: http.StatusBadRequest, }
var ErrInvalidRedirectURI = &fosite.RFC6749Error{ DescriptionField: "The value of one or more redirect_uris is invalid.", ErrorField: "invalid_redirect_uri", CodeField: http.StatusBadRequest, }
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct { // The maximum amount of clients to returned, upper bound is 500 clients. // in: query Limit int `json:"limit"` // The offset from where to start looking. // in: query Offset int `json:"offset"` // The name of the clients to filter by. // in: query Name string `json:"name"` // The owner of the clients to filter by. // in: query Owner string `json:"owner"` }
swagger:parameters listOAuth2Clients
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(r InternalRegistry) *Handler
func (*Handler) Create ¶
func (h *Handler) Create(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func (*Handler) Delete ¶
func (h *Handler) Delete(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
swagger:route DELETE /clients/{id} admin deleteOAuth2Client
Deletes an OAuth 2.0 Client ¶
Delete an existing OAuth 2.0 Client by its ID.
OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components.
Consumes: - application/json Produces: - application/json Schemes: http, https Responses: 204: emptyResponse 404: jsonError 500: jsonError
func (*Handler) Get ¶
func (h *Handler) Get(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
swagger:route GET /clients/{id} admin getOAuth2Client
Get an OAuth 2.0 Client.
Get an OAUth 2.0 client by its ID. This endpoint never returns passwords.
OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components.
Consumes: - application/json Produces: - application/json Schemes: http, https Responses: 200: oAuth2Client 401: jsonError 500: jsonError
func (*Handler) List ¶
func (h *Handler) List(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
swagger:route GET /clients admin listOAuth2Clients
List OAuth 2.0 Clients ¶
This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects.
OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components. The "Link" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>; rel="{page}"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma.
Consumes: - application/json Produces: - application/json Schemes: http, https Responses: 200: oAuth2ClientList 500: jsonError
func (*Handler) Patch ¶
func (h *Handler) Patch(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
swagger:route PATCH /clients/{id} admin patchOAuth2Client
Patch an OAuth 2.0 Client ¶
Patch an existing OAuth 2.0 Client. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe.
OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components.
Consumes: - application/json Produces: - application/json Schemes: http, https Responses: 200: oAuth2Client 500: jsonError
func (*Handler) SetRoutes ¶
func (h *Handler) SetRoutes(admin *helpers.RouterAdmin)
func (*Handler) Update ¶
func (h *Handler) Update(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
swagger:route PUT /clients/{id} admin updateOAuth2Client
Update an OAuth 2.0 Client ¶
Update an existing OAuth 2.0 Client. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe.
OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components.
Consumes: - application/json Produces: - application/json Schemes: http, https Responses: 200: oAuth2Client 500: jsonError
type InternalRegistry ¶
type InternalRegistry interface { helpers.RegistryWriter Registry }
type Storage ¶
type Storage interface { GetClient(ctx context.Context, id string) (fosite.Client, error) CreateClient(ctx context.Context, c *models.Client) error UpdateClient(ctx context.Context, c *models.Client) error DeleteClient(ctx context.Context, id string) error GetClients(ctx context.Context, filters Filter) ([]models.Client, error) CountClients(ctx context.Context) (int, error) GetConcreteClient(ctx context.Context, id string) (*models.Client, error) }
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}