Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminUIPlugin ¶
type AdminUIPlugin struct {
bramble.BasePlugin
// contains filtered or unexported fields
}
func (*AdminUIPlugin) ID ¶
func (p *AdminUIPlugin) ID() string
func (*AdminUIPlugin) Init ¶
func (p *AdminUIPlugin) Init(s *bramble.ExecutableSchema)
func (*AdminUIPlugin) SetupPrivateMux ¶
func (p *AdminUIPlugin) SetupPrivateMux(mux *http.ServeMux)
type Claims ¶
type Claims struct {
jwt.StandardClaims
Role string
}
type CorsPlugin ¶
type CorsPlugin struct {
bramble.BasePlugin
// contains filtered or unexported fields
}
func NewCorsPlugin ¶
func NewCorsPlugin(options CorsPluginConfig) *CorsPlugin
func (*CorsPlugin) ApplyMiddlewarePrivateMux ¶
func (p *CorsPlugin) ApplyMiddlewarePrivateMux(h http.Handler) http.Handler
func (*CorsPlugin) ApplyMiddlewarePublicMux ¶
func (p *CorsPlugin) ApplyMiddlewarePublicMux(h http.Handler) http.Handler
func (*CorsPlugin) Configure ¶
func (p *CorsPlugin) Configure(cfg *bramble.Config, data json.RawMessage) error
func (*CorsPlugin) ID ¶
func (p *CorsPlugin) ID() string
type CorsPluginConfig ¶
type JWTPlugin ¶
type JWTPlugin struct {
bramble.BasePlugin
// contains filtered or unexported fields
}
JWTPlugin validates that requests contains a valid JWT access token and add the necessary permissions and information to the context
func NewJWTPlugin ¶
func NewJWTPlugin(keyProviders []SigningKeyProvider, roles map[string]bramble.OperationPermissions) *JWTPlugin
func (*JWTPlugin) ApplyMiddlewarePublicMux ¶
type JWTPluginConfig ¶
type JWTPluginConfig struct {
// List of JWKS endpoints
JWKS []WellKnownKeyProvider `json:"jwks"`
// Map of kid -> public key (RSA, PEM format)
PublicKeys map[string]string `json:"public-keys"`
Roles map[string]bramble.OperationPermissions `json:"roles"`
}
type LimitsPlugin ¶
type LimitsPlugin struct {
bramble.BasePlugin
// contains filtered or unexported fields
}
func NewLimitsPlugin ¶
func NewLimitsPlugin(options LimitsPluginConfig) *LimitsPlugin
func (*LimitsPlugin) ApplyMiddlewarePublicMux ¶
func (p *LimitsPlugin) ApplyMiddlewarePublicMux(h http.Handler) http.Handler
func (*LimitsPlugin) Configure ¶
func (p *LimitsPlugin) Configure(cfg *bramble.Config, data json.RawMessage) error
func (*LimitsPlugin) ID ¶
func (p *LimitsPlugin) ID() string
type LimitsPluginConfig ¶
type ManualSigningKeysProvider ¶
type ManualSigningKeysProvider struct {
// contains filtered or unexported fields
}
func NewManualSigningKeysProvider ¶
func NewManualSigningKeysProvider(keys map[string]string) (*ManualSigningKeysProvider, error)
func (*ManualSigningKeysProvider) Keys ¶
func (m *ManualSigningKeysProvider) Keys() (map[string]*rsa.PublicKey, error)
func (*ManualSigningKeysProvider) Name ¶
func (m *ManualSigningKeysProvider) Name() string
type OpenTracingPlugin ¶
type OpenTracingPlugin struct {
bramble.BasePlugin
// contains filtered or unexported fields
}
func (*OpenTracingPlugin) ApplyMiddlewarePublicMux ¶
func (p *OpenTracingPlugin) ApplyMiddlewarePublicMux(h http.Handler) http.Handler
func (*OpenTracingPlugin) Configure ¶
func (p *OpenTracingPlugin) Configure(cfg *bramble.Config, pluginCfg json.RawMessage) error
func (*OpenTracingPlugin) ID ¶
func (p *OpenTracingPlugin) ID() string
func (*OpenTracingPlugin) Init ¶
func (p *OpenTracingPlugin) Init(s *bramble.ExecutableSchema)
type PlaygroundPlugin ¶
func (*PlaygroundPlugin) ID ¶
func (p *PlaygroundPlugin) ID() string
func (*PlaygroundPlugin) SetupPublicMux ¶
func (p *PlaygroundPlugin) SetupPublicMux(mux *http.ServeMux)
type SigningKeyProvider ¶
type WellKnownKeyProvider ¶
type WellKnownKeyProvider struct {
// contains filtered or unexported fields
}
func NewWellKnownKeyProvider ¶
func NewWellKnownKeyProvider(url string) *WellKnownKeyProvider
func (*WellKnownKeyProvider) Keys ¶
func (w *WellKnownKeyProvider) Keys() (map[string]*rsa.PublicKey, error)
func (*WellKnownKeyProvider) MarshalJSON ¶
func (w *WellKnownKeyProvider) MarshalJSON() ([]byte, error)
func (*WellKnownKeyProvider) Name ¶
func (w *WellKnownKeyProvider) Name() string
func (*WellKnownKeyProvider) UnmarshalJSON ¶
func (w *WellKnownKeyProvider) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.