auth

package
v0.0.0-...-1ac35b2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Copyright 2025 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Copyright 2024 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReportProblem

func ReportProblem(logger *zap.SugaredLogger, w http.ResponseWriter, detail string)

Types

type BasicAuthorizer

type BasicAuthorizer struct {
	// contains filtered or unexported fields
}

func (*BasicAuthorizer) Close

func (o *BasicAuthorizer) Close() error

func (*BasicAuthorizer) GetMiddleware

func (o *BasicAuthorizer) GetMiddleware(next http.Handler) http.Handler

func (*BasicAuthorizer) Init

func (o *BasicAuthorizer) Init(v *viper.Viper, logger *zap.SugaredLogger) error

type IAuthorizer

type IAuthorizer interface {
	// Init initializes the backend based on the configuration inside the
	// provided Viper object and using the provided logger.
	Init(v *viper.Viper, logger *zap.SugaredLogger) error

	// Close terminates the backend. The exact nature of this method is
	// backend-specific.
	Close() error

	// GetMiddleware returns an http.Handler that performs authorization
	GetMiddleware(http.Handler) http.Handler
}

IAuthorizer defines the interface that must be implemented by the veraison auth backends.

func NewAuthorizer

func NewAuthorizer(v *viper.Viper, logger *zap.SugaredLogger) (IAuthorizer, error)

func NewPassthroughAuthorizer

func NewPassthroughAuthorizer(logger *zap.SugaredLogger) IAuthorizer

type PassthroughAuthorizer

type PassthroughAuthorizer struct {
	// contains filtered or unexported fields
}

func (*PassthroughAuthorizer) Close

func (o *PassthroughAuthorizer) Close() error

func (*PassthroughAuthorizer) GetMiddleware

func (o *PassthroughAuthorizer) GetMiddleware(next http.Handler) http.Handler

func (*PassthroughAuthorizer) Init

func (o *PassthroughAuthorizer) Init(v *viper.Viper, logger *zap.SugaredLogger) error

Jump to

Keyboard shortcuts

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