webkeys

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: Apache-2.0 Imports: 13 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileConfig

type FileConfig struct {
	Paths []string
}

type FileJwksService

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

func (*FileJwksService) Keys

func (s *FileJwksService) Keys() (*jose.JSONWebKeySet, error)

func (*FileJwksService) Load

func (s *FileJwksService) Load() (*jose.JSONWebKeySet, error)

type GenerateJwksService

type GenerateJwksService struct {
	Private jose.JSONWebKey
	Public  jose.JSONWebKey
}

func NewGenerateJwksService

func NewGenerateJwksService() (*GenerateJwksService, error)

func (*GenerateJwksService) Keys

func (s *GenerateJwksService) Keys() (*jose.JSONWebKeySet, error)

func (*GenerateJwksService) Save

func (s *GenerateJwksService) Save(path string) error

type HTTPJwksService

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

func (*HTTPJwksService) Keys

func (s *HTTPJwksService) Keys() (*jose.JSONWebKeySet, error)

func (*HTTPJwksService) Load

func (s *HTTPJwksService) Load() (*jose.JSONWebKeySet, error)

type HttpConfig

type HttpConfig struct {
	URLs []string
}

type JWKSController

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

func NewJWKSController

func NewJWKSController(keyService WebKeysService) *JWKSController

func (*JWKSController) AppendRoutes

func (c *JWKSController) AppendRoutes(router *mux.Router) *mux.Router

func (*JWKSController) WellKnownJwks

func (c *JWKSController) WellKnownJwks(w http.ResponseWriter, r *http.Request)

func (*JWKSController) WellKnownJwksPath

func (c *JWKSController) WellKnownJwksPath() string

type WebKeysConfig

type WebKeysConfig struct {
	File *FileConfig
	HTTP *HttpConfig
}

type WebKeysService

type WebKeysService interface {
	Keys() (*jose.JSONWebKeySet, error)
}

func NewFileJwksService

func NewFileJwksService(config FileConfig) (WebKeysService, error)

func NewHTTPJwksService

func NewHTTPJwksService(config HttpConfig, client *http.Client) (WebKeysService, error)

func NewStaticJwksService

func NewStaticJwksService(keys *jose.JSONWebKeySet) WebKeysService

func NewWebKeysService

func NewWebKeysService(logger log.Logger, config WebKeysConfig) (WebKeysService, error)

Jump to

Keyboard shortcuts

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