jwt

package
v0.0.0-...-b5b672d Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStrategy

func NewStrategy(codeEntropy int, secret []byte, authorizeCodeLifespan time.Duration, accessTokenLifespan time.Duration) oauth2.TokenStrategy

Types

type Claims

type Claims struct {
	jwt.StandardClaims

	Scopes []string `json:"scopes,omitempty"`
}

type Strategy

type Strategy struct {
	// contains filtered or unexported fields
}

func (*Strategy) AccessTokenLifespan

func (s *Strategy) AccessTokenLifespan() time.Duration

func (*Strategy) AccessTokenSignature

func (s *Strategy) AccessTokenSignature(token string) (string, error)

func (*Strategy) AuthorizeCodeLifespan

func (s *Strategy) AuthorizeCodeLifespan() time.Duration

func (*Strategy) AuthorizeCodeSignature

func (s *Strategy) AuthorizeCodeSignature(token string) (string, error)

func (*Strategy) GenerateAccessToken

func (s *Strategy) GenerateAccessToken(_ context.Context, session oauth2.Session) (string, string, error)

func (*Strategy) GenerateAuthorizeCode

func (s *Strategy) GenerateAuthorizeCode(_ context.Context, session oauth2.Session) (string, string, error)

func (*Strategy) GenerateRefreshToken

func (s *Strategy) GenerateRefreshToken(_ context.Context, _ oauth2.Session) (string, string, error)

func (*Strategy) RefreshTokenSignature

func (s *Strategy) RefreshTokenSignature(token string) (string, error)

func (*Strategy) ValidateAccessToken

func (s *Strategy) ValidateAccessToken(_ context.Context, session oauth2.Session, token string) error

func (*Strategy) ValidateAuthorizeCode

func (s *Strategy) ValidateAuthorizeCode(_ context.Context, session oauth2.Session, token string) error

func (*Strategy) ValidateRefreshToken

func (s *Strategy) ValidateRefreshToken(_ context.Context, _ oauth2.Session, token string) error

Jump to

Keyboard shortcuts

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