Documentation ¶
Index ¶
- Variables
- func BasicAuth(username, password string) string
- func FositeStore() *storage.MemoryStore
- func GenerateSecret(length int) ([]byte, error)
- func LadonWarden(ps map[string]ladon.Policy) ladon.Warden
- func LogError(err error, logger log.FieldLogger)
- func Must(err error, message string, args ...interface{})
- func MustINSECURELOWENTROPYRSAKEYFORTEST() *rsa.PrivateKey
- func PermanentRedirect(to string) func(rw http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func Retry(logger logrus.FieldLogger, maxWait time.Duration, failAfter time.Duration, ...) (err error)
- func Tokens(length int) (res [][]string)
- type FositeStorer
- type RichError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = &RichError{ Status: http.StatusNotFound, error: errors.New("Not found"), } )
View Source
var HMACStrategy = &oauth2.HMACSHAStrategy{ Enigma: &hmac.HMACStrategy{ GlobalSecret: []byte("1234567890123456789012345678901234567890"), }, AccessTokenLifespan: time.Hour, AuthorizeCodeLifespan: time.Hour, }
Functions ¶
func FositeStore ¶
func FositeStore() *storage.MemoryStore
func GenerateSecret ¶
func LogError ¶
func LogError(err error, logger log.FieldLogger)
func MustINSECURELOWENTROPYRSAKEYFORTEST ¶ added in v0.10.0
func MustINSECURELOWENTROPYRSAKEYFORTEST() *rsa.PrivateKey
func PermanentRedirect ¶ added in v0.11.13
func PermanentRedirect(to string) func(rw http.ResponseWriter, r *http.Request, _ httprouter.Params)
Types ¶
type FositeStorer ¶
type FositeStorer interface { fosite.Storage oauth2.CoreStorage openid.OpenIDConnectRequestStorage pkce.PKCERequestStorage RevokeRefreshToken(ctx context.Context, requestID string) error RevokeAccessToken(ctx context.Context, requestID string) error FlushInactiveAccessTokens(ctx context.Context, notAfter time.Time) error }
Click to show internal directories.
Click to hide internal directories.