Documentation
¶
Overview ¶
Package auth implements NIP-42 authentication.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ChallengeTag is the tag for the challenge in a NIP-42 auth event // (prevents relay attacks). ChallengeTag = []byte("challenge") // RelayTag is the relay tag for a NIP-42 auth event (prevents cross-server // attacks). RelayTag = []byte("relay") )
Functions ¶
func CheckPrivilege ¶ added in v0.2.1
func CreateUnsigned ¶
CreateUnsigned creates an event which should be sent via an "AUTH" command. If the authentication succeeds, the user will be authenticated as a pubkey.
func GenerateChallenge ¶
func GenerateChallenge() (b []byte)
GenerateChallenge creates a reasonable, 16-byte base64 challenge string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.