noauth

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: Apache-2.0 Imports: 3 Imported by: ? 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: 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.

Directories

Path Synopsis
package: noauthtest / authn type: test-support job: the noauth backend's conformance setup hook, beside the backend limits: a test helper; only the conformance driver imports it (-> adapters/auth)
package: noauthtest / authn type: test-support job: the noauth backend's conformance setup hook, beside the backend limits: a test helper; only the conformance driver imports it (-> adapters/auth)

Jump to

Keyboard shortcuts

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