Skip to main content

validate_token

Function validate_token 

Source
pub fn validate_token(kind: TokenKind, token: &str) -> Result<(), NamingError>
Expand description

Validates the shared identity lexicon [a-z0-9][a-z0-9_-]{0,62}.

CredentialPublic is an inbox-prefix component rather than a registry token; it accepts ASCII letters because real NATS public nkeys are uppercase. Account and EventName use the narrower lexicon without the hyphen, and EventVersion accepts only v{n} (see validate_event_version).