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 ¶
func (j *NoAuth) Authenticate( _ context.Context, _ *authmode.AuthenticateRequestData, ) (authmode.AuthenticatedOutput, error)
Authenticate validates and authenticates the token from the auth webhook request.
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 ¶
func (na RelyAuthNoAuthConfig) Equal(target RelyAuthNoAuthConfig) bool
Equal checks if the target value is equal.
func (RelyAuthNoAuthConfig) GetMode ¶
func (RelyAuthNoAuthConfig) GetMode() authmode.AuthMode
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.
Click to show internal directories.
Click to hide internal directories.