Documentation
¶
Overview ¶
Package identifier creates and validates DANS resource and credential IDs.
Index ¶
Constants ¶
View Source
const (
// TokenPrefix identifies the only token format supported by this release.
TokenPrefix = "dans_v1_"
)
Variables ¶
View Source
var ( // ErrInvalidUUID reports a resource ID that is not a canonical lowercase UUIDv4. ErrInvalidUUID = errors.New("identifier: invalid UUIDv4") // ErrInvalidToken reports a credential that is not in the supported token format. ErrInvalidToken = errors.New("identifier: invalid API token") )
Functions ¶
func DigestToken ¶
DigestToken returns the indexed lookup digest for the complete token value.
func ValidateToken ¶
ValidateToken verifies exact syntax and canonical unpadded base64url encoding.
func ValidateUUID ¶
ValidateUUID verifies the canonical lowercase UUIDv4 resource-ID format.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.