noauth

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package noauth implements the noAuth mode.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NoAuth

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

NoAuth implements the authenticator with anonymous user.

func NewNoAuth

func NewNoAuth(
	ctx context.Context,
	config *RelyAuthNoAuthConfig,
	options authmode.RelyAuthenticatorOptions,
) (*NoAuth, error)

NewNoAuth creates an API key authenticator instance.

func (*NoAuth) Authenticate

Authenticate validates and authenticates the token from the auth webhook request.

func (*NoAuth) Close

func (*NoAuth) Close() error

Close handles the resources cleaning.

func (NoAuth) Equal

func (j NoAuth) Equal(target NoAuth) bool

Equal checks if the target value is equal.

func (*NoAuth) IDs added in v0.0.2

func (j *NoAuth) IDs() []string

IDs returns identities of this authenticator.

func (*NoAuth) Mode

func (*NoAuth) Mode() authmode.AuthMode

Mode returns the auth mode of the current authenticator.

type RelyAuthNoAuthConfig

type RelyAuthNoAuthConfig struct {
	// Unique identity of the auth config.
	// If not set, ID will be the index of the array.
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// Authentication mode which is always noAuth.
	Mode authmode.AuthMode `json:"mode" jsonschema:"enum=noAuth" yaml:"mode"`
	// Custom session variables for this auth mode.
	SessionVariables map[string]goenvconf.EnvAny `json:"sessionVariables" yaml:"sessionVariables"`
}

RelyAuthNoAuthConfig contains the definition config for unauthenticated users.

func NewNoAuthDefinition

func NewNoAuthDefinition(sessionVariables map[string]goenvconf.EnvAny) *RelyAuthNoAuthConfig

NewNoAuthDefinition creates a new NoAuthConfig instance.

func (RelyAuthNoAuthConfig) Equal

Equal checks if the target value is equal.

func (RelyAuthNoAuthConfig) GetMode

GetMode get the auth mode of the current config.

func (RelyAuthNoAuthConfig) IsZero

func (na RelyAuthNoAuthConfig) IsZero() bool

IsZero if the current instance is empty.

func (RelyAuthNoAuthConfig) Validate

func (RelyAuthNoAuthConfig) Validate() error

Validate if the current instance is valid.

Jump to

Keyboard shortcuts

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