token

package
v0.0.0-...-30842c3 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGenerator

func NewGenerator(signingKey *rsa.PrivateKey) *generator

func NewIssuer

func NewIssuer(teamFactory db.TeamFactory, generator Generator, duration time.Duration) *issuer

func NewVerifier

func NewVerifier(clientID, issuerURL string) *verifier

func RandomString

func RandomString() string

Types

type Generator

type Generator interface {
	Generate(map[string]interface{}) (*oauth2.Token, error)
}

type Issuer

type Issuer interface {
	Issue(*VerifiedClaims) (*oauth2.Token, error)
}

type StateToken

type StateToken struct {
	RedirectUri string `json:"redirect_uri"`
	Entropy     string `json:"entropy"`
}

type VerifiedClaims

type VerifiedClaims struct {
	Sub         string
	Email       string
	Name        string
	UserID      string
	UserName    string
	ConnectorID string
	Groups      []string
}

type Verifier

type Verifier interface {
	Verify(context.Context, *oauth2.Token) (*VerifiedClaims, error)
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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