Documentation
¶
Overview ¶
Package basic provides a basic authentication controller for the opampcommander API client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller is a struct that implements the basic authentication controller for the opampcommander API client.
func NewController ¶
func NewController( logger *slog.Logger, service *security.Service, ) *Controller
NewController creates a new instance of the Controller struct with the provided settings.
func (*Controller) BasicAuth ¶
func (c *Controller) BasicAuth(ctx *gin.Context)
BasicAuth handles the HTTP request for basic authentication. It expects the request to contain basic auth credentials in the format "username:password".
@Summary Basic Authentication @Tags auth, basic @Description Authenticate using basic auth credentials. @Accept json @Produce json @Success 200 {object} AuthnTokenResponse @Failure 401 {object} map[string]any @Router /api/v1/auth/basic [get].
func (*Controller) Info ¶
func (c *Controller) Info(ctx *gin.Context)
Info handles the HTTP request to get auth info.
@Summary Info @Tags auth, basic @Description Get Authentication Info. @Produce json @Success 200 {object} InfoResponse @Failure 401 {object} map[string]any @Router /api/v1/auth/info [get].
func (*Controller) RoutesInfo ¶
func (c *Controller) RoutesInfo() gin.RoutesInfo
RoutesInfo returns the routes information for the basic authentication controller.