noauth

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

package: noauth / authn type: adapter job: authenticate every request as one fixed subject — the no-auth backend limits: no credential checking; for single-tenant/dev stacks (-> auth.New)

Package noauth is the open authentication backend: it ignores the request credential and returns one configured subject for every call. It suits a stack with no external auth — a single operator, a dev box, a trusted network — where authorization still keys on the returned subject.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

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

Auth is the no-auth backend: every Authenticate returns the same subject.

func New

func New(ctx context.Context, cfg scope.Section) (*Auth, error)

New returns a no-auth backend that authenticates every request as the section's "subject" value. An empty or absent subject defaults to "anonymous" so downstream authorization always has a non-empty account to key on.

func (*Auth) Authenticate

func (a *Auth) Authenticate(_ context.Context, _ string) (access.Principal, error)

Authenticate ignores the token and returns the configured account with no caveats — the open backend never attenuates.

func (*Auth) Scheme

func (a *Auth) Scheme() string

Scheme reports the empty (NoAuth) scheme: this backend consumes no credential. Returned as a literal so noauth need not import the auth package that dispatches to it (which would cycle); the value equals auth.SchemeNone.

Jump to

Keyboard shortcuts

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