jwt

package
v0.0.0-...-e184c60 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const TokenKindAapp = "app"

TokenKindAapp is a token used to auth to CredStore.

View Source
const TokenKindAuth = "auth"

TokenKindAuth is a token used to query CredStore.

View Source
const TokenKindRPC = "rpc"

TokenKindRPC is a token used to query CredStore.

Variables

This section is empty.

Functions

func BuildAppToken

func BuildAppToken(client string) ([]byte, error)

BuildAppToken creates and serializes a session token.

func BuildAuthToken

func BuildAuthToken(client string) ([]byte, error)

BuildAuthToken creates and serializes a session token.

func BuildRPCToken

func BuildRPCToken(client, service, method string) ([]byte, error)

BuildRPCToken creates and serializes a session token.

Types

type AppToken

type AppToken struct {
	Client string `json:"cli"`
	Kind   string `json:"kind"`
}

AppToken is JWT session token for CredStore.

func (AppToken) Verify

func (tok AppToken) Verify() error

Verify verifies token structure.

type AuthToken

type AuthToken struct {
	Client string `json:"cli"`
	Kind   string `json:"kind"`
}

AuthToken is JWT session token for CredStore.

func (AuthToken) Verify

func (tok AuthToken) Verify() error

Verify verifies token structure.

type RPCToken

type RPCToken struct {
	Client  string `json:"cli"`
	Kind    string `json:"kind"`
	Service string `json:"svc"`
	Method  string `json:"meth"`
}

RPCToken is JWT token to access other services.

func (RPCToken) Verify

func (tok RPCToken) Verify() error

Verify verifies token structure.

Jump to

Keyboard shortcuts

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