tokens

package
v0.13.1-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateJWTToken

func CreateJWTToken(username string, token string, secret []byte) (string, error)

CreateJWTToken creates a jwt token containing a username and another token using the input secret

Types

type TokenContent

type TokenContent struct {
	Username string
	Token    string
}

TokenContent represents the content we store in a JWT token - the username and k8s token

func ParseJWTToken

func ParseJWTToken(tokenString string, secret []byte) (content *TokenContent, err error)

ParseJWTToken parses the token string into a TokenContent

Jump to

Keyboard shortcuts

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