basic

package
v0.1.33 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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,
	userUsecase userport.UserUsecase,
) *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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL