domain_token

package
v0.0.0-...-1a88b7f Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Domain Registration Token * * see docs/domain-token.md for more information

Index

Constants

This section is empty.

Variables

View Source
var (
	// uuid.NewSHA1(uuid.NameSpaceURL, []byte("https://console.redhat.com/api/idmsvc"))
	NamespaceIDMSVC           = uuid.MustParse("2978cc95-31c8-503d-ba8f-581911b6bea0")
	RegisterDomainPersonality = []byte("register domain")
)

Functions

func TokenDomainId

func TokenDomainId(token DomainRegistrationToken) uuid.UUID

Derive domain id from token string

func VerifyDomainRegistrationToken

func VerifyDomainRegistrationToken(
	key []byte, domainType string, orgID string, token DomainRegistrationToken,
) (domainId uuid.UUID, err error)

Verify signature, *orgID* binding, and expiration time stamp of a token. Returns the domain UUID on success.

Types

type DomainRegistrationToken

type DomainRegistrationToken string

func NewDomainRegistrationToken

func NewDomainRegistrationToken(
	key []byte, domainType string, orgID string, validity time.Duration,
) (token DomainRegistrationToken, expireNS uint64, err error)

Create a new domain registration token The token is signed by *key*, bound to *orgID*, and validate until now + validity duration.

Jump to

Keyboard shortcuts

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