challenge

package
v1.5.0-alpha13 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AnonymousModePolicy *policy.Policy = lo.Must(policy.FromFS(policies, "challenge_ns_anon.rego"))

AnonymousModePolicy grants read-only access to all namespaces and full access to a namespace matching the user's client ID, derived from their submitted public key.

Functions

func NewAuthenticator

func NewAuthenticator(p *policy.Policy, getPhrase encoding.BinaryMarshaler, key *rsa.PrivateKey, nodeID string) authn.Authenticator

Types

type Responder added in v1.3.2

type Responder struct {
	Signer system.Signer
}

func (*Responder) Respond added in v1.3.2

func (c *Responder) Respond(input *json.RawMessage) ([]byte, error)

type StringMarshaller

type StringMarshaller struct {
	Input string
}

StringMarshaller is a struct that implements the encoding.BinaryMarshaler interface for strings. It holds a string value that can be marshaled into a byte slice.

func NewStringMarshaller

func NewStringMarshaller(input string) *StringMarshaller

NewStringMarshaller returns a pointer to a new StringMarshaller initialized with the given input string. This function is typically used to prepare a string for binary marshaling.

func (*StringMarshaller) MarshalBinary

func (m *StringMarshaller) MarshalBinary() ([]byte, error)

MarshalBinary implements the encoding.BinaryMarshaler interface. It converts the string held by StringMarshaller into a slice of bytes. As string to byte conversion in Go is straightforward and error-free, this method returns nil for the error.

Jump to

Keyboard shortcuts

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