rpid

package
v0.8.0-dev.5 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package rpid derives and validates the WebAuthn relying-party ID for the host subflux is reached on: the registrable domain (eTLD+1) from the public suffix list, never a label strip, so a host whose provider is itself a public suffix (foo.duckdns.org, nas.synology.me) collapses to the exact host instead of to an illegal bare suffix.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Derive

func Derive(host string) (string, error)

Derive returns the relying-party ID for host: the registrable domain of a DNS name, or "localhost" verbatim. The error is a *Error.

func Validate

func Validate(id string) error

Validate judges an operator-typed value as written, without deriving: a value narrower than the registrable domain is specification-legal and is accepted. The error is a *Error.

func ValidateForHost

func ValidateForHost(id, host string) error

ValidateForHost is Validate plus the served check: host must be id or a subdomain of it. The dot in the needle is the guard against "evilexample.com" matching "example.com".

Types

This section is empty.

Jump to

Keyboard shortcuts

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