resourceurl

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package resourceurl defines the canonical protected-resource URL identity shared by the server, enrollment registry, and discovery client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Canonical

func Canonical(raw string) (string, error)

Canonical validates and canonicalizes an RFC 9728 HTTPS resource. Root slash, host case, and the default HTTPS port have one stable representation.

func MetadataURL

func MetadataURL(raw string) string

MetadataURL returns the RFC 9728 metadata URL for a canonical resource.

func Safe

func Safe(value string) bool

Safe reports whether value is a non-empty, bounded string free of control and Unicode format characters. Shared by the server, enrollment registry, and discovery client so an identity-safety tightening cannot drift between them.

func ValidScopeToken

func ValidScopeToken(scope string) bool

ValidScopeToken reports whether scope is a single RFC 6749 §3.3 scope-token (VSCHAR minus DQUOTE/backslash, no comma — a comma is the CSV separator wherever scopes are joined for display or storage). Shared by the server's protected-resource profile, the OIDC CLI/Helm flag parser, and the discovery client so an untrusted metadata response cannot smuggle a separator character into a scope value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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