kite: github.com/koding/kite/kitetest Index | Files

package kitetest

import "github.com/koding/kite/kitetest"

Index

Package Files

kitetest.go

func ExtractKiteID Uses

func ExtractKiteID(token string) (string, error)

ExtractKiteID extracts kite ID from the raw JWT token.

func GenerateKiteKey Uses

func GenerateKiteKey(k *KiteKey, keys *KeyPair) (*jwt.Token, error)

GenerateKiteKey

type KeyPair Uses

type KeyPair struct {
    Public  []byte
    Private []byte
}

KeyPair represents PEM encoded RSA key pair.

func GenerateKeyPair Uses

func GenerateKeyPair() (*KeyPair, error)

GenerateKeyPair

type KiteKey Uses

type KiteKey struct {
    ID         string        `json:"keyID,omitempty"`
    Issuer     string        `json:"issuer,omitempty"`
    Username   string        `json:"username,omitempty"`
    IssuedAt   int64         `json:"issuedAt,omitempty"`
    KontrolURL string        `json:"kontrolURL,omitempty"`
    URL        string        `json:"url,omitempty"`
    Kite       protocol.Kite `json:"kite,omitempty"`
}

KiteKey represents JWT token used in kite authentication, also known as kite.key.

type TokenExtractor Uses

type TokenExtractor struct {
    Token  *jwt.Token
    KiteID string
}

TokenExtractor is used to extract kite ID from the given JWT token.

func (*TokenExtractor) Extract Uses

func (te *TokenExtractor) Extract(tok *jwt.Token) (interface{}, error)

Extract is a jwt.Keyfunc that extracts kite ID.

Package kitetest imports 10 packages (graph). Updated 2016-09-12. Refresh now. Tools for package owners.