authn

package
v0.0.0-...-ecbdc9c Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

README

Authentication

The authn package provides a handful of authn methods:

  • Client Certificate
  • OAuth2/OIDC tokens
  • Pre-Shared Keys
  • Guest (non-authenticated)

We need to decide what goes in api/identity.go and how it gets populated with the different authn methods.

We might have another method in here for the consoledot rh-identity token.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config CompletedConfig, logger *log.Helper) (api.Authenticator, error)

Types

type CompletedConfig

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

type Config

type Config struct {
	AllowUnauthenticated bool

	Oidc          *oidc.Config
	PreSharedKeys *psk.Config
}

func NewConfig

func NewConfig(o *Options) *Config

func (*Config) Complete

func (c *Config) Complete() (CompletedConfig, []error)

type Options

type Options struct {
	AllowUnauthenticated bool `mapstructure:"allow-unauthenticated"`

	Oidc          *oidc.Options `mapstructure:"oidc"`
	PreSharedKeys *psk.Options  `mapstructure:"psk"`
}

func NewOptions

func NewOptions() *Options

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet, prefix string)

func (*Options) Complete

func (o *Options) Complete() []error

func (*Options) Validate

func (o *Options) Validate() []error

Directories

Path Synopsis
package oidc provides an Authenticator based on OAuth2 OIDC JWTs.
package oidc provides an Authenticator based on OAuth2 OIDC JWTs.
Package psk provides an authenticator based on pre-shared keys
Package psk provides an authenticator based on pre-shared keys

Jump to

Keyboard shortcuts

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