strategies

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: Apache-2.0 Imports: 12 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultLoggingErrorStrategy

func DefaultLoggingErrorStrategy(err error, w http.ResponseWriter)

Types

type DefaultStrategy

type DefaultStrategy struct {
	PrivateKey               *rsa.PrivateKey
	PublicKey                *rsa.PublicKey
	HmacKey                  string
	AccessTokenEntropy       int
	AuthorizationCodeEntropy int
	RefreshTokenEntropy      int
	Issuer                   string
}

func NewDefaultStrategy

func NewDefaultStrategy(privateKey *rsa.PrivateKey, publicKey *rsa.PublicKey) *DefaultStrategy

func (*DefaultStrategy) Configure

func (ds *DefaultStrategy) Configure(_ interface{}, config *sdk.Config, _ ...interface{})

func (*DefaultStrategy) GenerateAccessToken

func (ds *DefaultStrategy) GenerateAccessToken() (token string, signature string)

func (*DefaultStrategy) GenerateAuthCode

func (ds *DefaultStrategy) GenerateAuthCode() (code string, signature string)

func (*DefaultStrategy) GenerateIDToken

func (ds *DefaultStrategy) GenerateIDToken(profile sdk.RequestProfile, client sdk.IClient, expiry time.Time,
	transactionClaims map[string]interface{}) (idToken string, err error)

func (*DefaultStrategy) GenerateRefreshToken

func (ds *DefaultStrategy) GenerateRefreshToken() (token string, signature string)

func (*DefaultStrategy) SignAccessToken

func (ds *DefaultStrategy) SignAccessToken(token string) (signature string, err error)

func (*DefaultStrategy) SignAuthCode

func (ds *DefaultStrategy) SignAuthCode(code string) (signature string, err error)

func (*DefaultStrategy) SignRefreshToken

func (ds *DefaultStrategy) SignRefreshToken(token string) (signature string, err error)

Jump to

Keyboard shortcuts

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