Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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 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.