testutil

package
v0.0.0-...-4bed82c Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package testutil provides a default Kontrol kites for using in tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfig

func NewConfig() *config.Config

func NewKiteKey

func NewKiteKey() *jwt.Token

NewKiteKey returns a new generated kite key. (Copied and modified from kontrol.go) If the host does not have a kite.key file kite.New() panics. This is a helper to put a fake key on it's location.

func NewKiteKeyUsername

func NewKiteKeyUsername(username string) *jwt.Token

NewKiteKeyUsername is like NewKiteKey() but it uses the given username instead of using the "testuser" name

func NewKiteKeyWithKeyPair

func NewKiteKeyWithKeyPair(private, public string) *jwt.Token

func NewToken

func NewToken(username, private, public string) *jwt.Token

NewToken creates new JWT token for the gien username. It embedds the given public key as kontrolKey and signs the token with the private one.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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