auth

package
v1.2.15 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: GPL-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Required = "auth-required"

Variables

This section is empty.

Functions

func CreateUnsigned

func CreateUnsigned(challenge, relayURL string) *event.T

CreateUnsigned creates an event which should be sent via an "AUTH" command. If the authentication succeeds, the user will be authenticated as pubkey.

func Validate

func Validate(evt *event.T, challenge string,
	relayURL string) (pubkey string, ok bool, err error)

Validate checks whether event is a valid NIP-42 event for given challenge and relayURL. The result of the validation is encoded in the ok bool.

Types

This section is empty.

Jump to

Keyboard shortcuts

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