auth

package
v0.0.0-...-d76060a Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(signingKey string) gin.HandlerFunc

Types

type TokenGenerator

type TokenGenerator interface {
	Generate(userID, orgID uint, expiresAt *time.Time) (string, string, error)
}

func NewTokenGenerator

func NewTokenGenerator(issuer, audience, signingKey string) TokenGenerator

type User

type User struct {
	ClusterID string `json:"clusterID"`
	OrgID     string `json:"orgID"`
}

func GetCurrentUser

func GetCurrentUser(c *gin.Context) *User

Jump to

Keyboard shortcuts

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