token

package
v1.6.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenIDBytes     = 3
	TokenSecretBytes = 8
)

Variables

This section is empty.

Functions

func BearerToken

func BearerToken(d *kubeadmapi.TokenDiscovery) string

BearerToken returns a string representation of the passed token.

func GenerateToken

func GenerateToken(d *kubeadmapi.TokenDiscovery) error

GenerateToken generates a new token with a token ID that is valid as a Kubernetes DNS label. For more info, see kubernetes/pkg/util/validation/validation.go.

func ParseToken

func ParseToken(s string) (string, string, error)

ParseToken tries and parse a valid token from a string. A token ID and token secret are returned in case of success, an error otherwise.

func ParseTokenID

func ParseTokenID(s string) error

ParseTokenID tries and parse a valid token ID from a string. An error is returned in case of failure.

func ValidateToken

func ValidateToken(d *kubeadmapi.TokenDiscovery) (bool, error)

ValidateToken validates whether a token is well-formed. In case it's not, the corresponding error is returned as well.

Types

This section is empty.

Jump to

Keyboard shortcuts

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