security

package
v0.0.0-...-ce96b73 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetToken

func GetToken(r *http.Request) (*oauth2.Token, error)

func NewDecorator

func NewDecorator(config *oauth2.Config, next http.Handler) http.Handler

func ParseClaims

func ParseClaims(token string) (*jwt.Claims, error)

func SetToken

func SetToken(rw http.ResponseWriter, token *oauth2.Token) error

Types

type Claims

type Claims struct {
	jwt.Claims
	PreferredUsername string `json:"preferred_username,omitempty"`
}

Jump to

Keyboard shortcuts

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