Documentation
¶
Overview ¶
Package server - Stream Management API for OpenID Shared Security Events [OpenID Spec](https://openid.net/specs/openid-sse-framework-1_0.html#management) HTTP API to be implemented by Event Transmitters. This API can be used by Event Receivers to query and update the Event Stream configuration and status, to add and remove subjects, and to trigger verification.
Stream Management API for OpenID Shared Security Events *
[OpenID Spec](https://openid.net/specs/openid-sse-framework-1_0.html#management) HTTP API to be implemented by Event Transmitters. This API can be used by Event Receivers to query and update the Event Stream configuration and status, to add and remove subjects, and to trigger verification. *
API version: 1.0.0
Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
Stream Management API for OpenID Shared Security Events *
[OpenID Spec](https://openid.net/specs/openid-sse-framework-1_0.html#management) HTTP API to be implemented by Event Transmitters. This API can be used by Event Receivers to query and update the Event Stream configuration and status, to add and remove subjects, and to trigger verification. *
API version: 1.0.0
Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
Index ¶
- func PrometheusHttpMiddleware(next http.Handler) http.Handler
- type ClientPollStream
- type HttpRouter
- type PrometheusHandler
- type Route
- type Routes
- type SignalsApplication
- func (sa *SignalsApplication) AddSubject(w http.ResponseWriter, _ *http.Request)
- func (sa *SignalsApplication) ClosePollReceiver(sid string)
- func (sa *SignalsApplication) CreateJwksIssuer(w http.ResponseWriter, r *http.Request)
- func (sa *SignalsApplication) GetPollReceiverCnt() float64
- func (sa *SignalsApplication) GetPushReceiverCnt() float64
- func (sa *SignalsApplication) GetStatus(w http.ResponseWriter, r *http.Request)
- func (sa *SignalsApplication) HandleClientPollReceiver(streamState *model.StreamStateRecord) *ClientPollStream
- func (sa *SignalsApplication) HealthCheck() bool
- func (sa *SignalsApplication) Index(w http.ResponseWriter, r *http.Request)
- func (sa *SignalsApplication) InitializePrometheus()
- func (sa *SignalsApplication) InitializeReceivers()
- func (sa *SignalsApplication) IssuerProjectIat(w http.ResponseWriter, r *http.Request)
- func (sa *SignalsApplication) JwksJson(w http.ResponseWriter, _ *http.Request)
- func (sa *SignalsApplication) JwksJsonIssuer(w http.ResponseWriter, r *http.Request)
- func (sa *SignalsApplication) Logger(inner http.Handler, name string) http.Handler
- func (sa *SignalsApplication) Name() string
- func (sa *SignalsApplication) PollEvents(w http.ResponseWriter, r *http.Request)
- func (sa *SignalsApplication) ReceivePushEvent(w http.ResponseWriter, r *http.Request)
- func (sa *SignalsApplication) RegisterClient(w http.ResponseWriter, r *http.Request)
- func (sa *SignalsApplication) RemoveSubject(w http.ResponseWriter, _ *http.Request)
- func (sa *SignalsApplication) Shutdown()
- func (sa *SignalsApplication) StreamCreate(w http.ResponseWriter, r *http.Request)
- func (sa *SignalsApplication) StreamDelete(w http.ResponseWriter, r *http.Request)
- func (sa *SignalsApplication) StreamGet(w http.ResponseWriter, r *http.Request)
- func (sa *SignalsApplication) StreamUpdate(w http.ResponseWriter, r *http.Request)
- func (sa *SignalsApplication) TriggerEvent(w http.ResponseWriter, _ *http.Request)
- func (sa *SignalsApplication) UpdateStatus(w http.ResponseWriter, r *http.Request)
- func (sa *SignalsApplication) VerificationRequest(w http.ResponseWriter, _ *http.Request)
- func (sa *SignalsApplication) WellKnownSsfConfigurationGet(w http.ResponseWriter, _ *http.Request)
- func (sa *SignalsApplication) WellKnownSsfConfigurationIssuerGet(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientPollStream ¶
type ClientPollStream struct {
// contains filtered or unexported fields
}
func (*ClientPollStream) Close ¶
func (ps *ClientPollStream) Close()
type HttpRouter ¶
type HttpRouter struct {
// contains filtered or unexported fields
}
func NewRouter ¶
func NewRouter(application *SignalsApplication) *HttpRouter
type PrometheusHandler ¶
type PrometheusHandler struct { App *SignalsApplication EventsIn, EventsOut *prometheus.CounterVec PubPushCnt, PubPollCnt prometheus.GaugeFunc RcvPushCnt, RcvPollCnt prometheus.GaugeFunc }
type SignalsApplication ¶
type SignalsApplication struct { Provider dbProviders.DbProviderInterface Server *http.Server EventRouter eventRouter.EventRouter BaseUrl *url.URL HostName string DefIssuer string AdminRole string AdminUser string AdminPwd string Auth *authUtil.AuthIssuer Stats *PrometheusHandler // contains filtered or unexported fields }
func StartServer ¶
func StartServer(addr string, provider dbProviders.DbProviderInterface, baseUrlString string) *SignalsApplication
func (*SignalsApplication) AddSubject ¶
func (sa *SignalsApplication) AddSubject(w http.ResponseWriter, _ *http.Request)
func (*SignalsApplication) ClosePollReceiver ¶
func (sa *SignalsApplication) ClosePollReceiver(sid string)
func (*SignalsApplication) CreateJwksIssuer ¶
func (sa *SignalsApplication) CreateJwksIssuer(w http.ResponseWriter, r *http.Request)
func (*SignalsApplication) GetPollReceiverCnt ¶
func (sa *SignalsApplication) GetPollReceiverCnt() float64
func (*SignalsApplication) GetPushReceiverCnt ¶
func (sa *SignalsApplication) GetPushReceiverCnt() float64
func (*SignalsApplication) GetStatus ¶
func (sa *SignalsApplication) GetStatus(w http.ResponseWriter, r *http.Request)
func (*SignalsApplication) HandleClientPollReceiver ¶
func (sa *SignalsApplication) HandleClientPollReceiver(streamState *model.StreamStateRecord) *ClientPollStream
HandleClientPollReceiver checks if a stream is already defined and updates the configuration returning the ClientPollStream. Otherwise, if new, a new receiver is started and its handle is returned. Transmitter streams are ignored automatically.
func (*SignalsApplication) HealthCheck ¶
func (sa *SignalsApplication) HealthCheck() bool
func (*SignalsApplication) Index ¶
func (sa *SignalsApplication) Index(w http.ResponseWriter, r *http.Request)
func (*SignalsApplication) InitializePrometheus ¶
func (sa *SignalsApplication) InitializePrometheus()
func (*SignalsApplication) InitializeReceivers ¶
func (sa *SignalsApplication) InitializeReceivers()
InitializeReceivers handles updates to a receiver client polling stream when changes occur.
func (*SignalsApplication) IssuerProjectIat ¶
func (sa *SignalsApplication) IssuerProjectIat(w http.ResponseWriter, r *http.Request)
IssuerProjectIat generates an Initial Access Auth (IAT) which can be used at the registration endpoint. The token generated will have a unique projectId and scope of `register` that will allow individual clients to register and access the stream management functions of the server for a particular project. If an existing authorization is provided with scope authUtil.ScopeStreamAdmin, then the existing ProjectId is used. This allows the creation of "fresh" IATs which can be used to register new clients in the same project (e.g. because the current IAT is expired, or because separate IATs are desired.
func (*SignalsApplication) JwksJson ¶
func (sa *SignalsApplication) JwksJson(w http.ResponseWriter, _ *http.Request)
func (*SignalsApplication) JwksJsonIssuer ¶
func (sa *SignalsApplication) JwksJsonIssuer(w http.ResponseWriter, r *http.Request)
func (*SignalsApplication) Name ¶
func (sa *SignalsApplication) Name() string
func (*SignalsApplication) PollEvents ¶
func (sa *SignalsApplication) PollEvents(w http.ResponseWriter, r *http.Request)
PollEvents implements the server side of RFC8936 Poll-based delivery of SET Tokens
func (*SignalsApplication) ReceivePushEvent ¶
func (sa *SignalsApplication) ReceivePushEvent(w http.ResponseWriter, r *http.Request)
ReceivePushEvent events enables an endpoint to receive events from the RFC8935 SET Push provider
func (*SignalsApplication) RegisterClient ¶
func (sa *SignalsApplication) RegisterClient(w http.ResponseWriter, r *http.Request)
RegisterClient handles initial SSF client registrations and issues tokens enabling stream management. In order to access the registration endpoint an initial access token with scope 'register' is required. If 'root' scope is provided, a registration token is issued which can be used to start the client registration process.
func (*SignalsApplication) RemoveSubject ¶
func (sa *SignalsApplication) RemoveSubject(w http.ResponseWriter, _ *http.Request)
func (*SignalsApplication) Shutdown ¶
func (sa *SignalsApplication) Shutdown()
func (*SignalsApplication) StreamCreate ¶
func (sa *SignalsApplication) StreamCreate(w http.ResponseWriter, r *http.Request)
func (*SignalsApplication) StreamDelete ¶
func (sa *SignalsApplication) StreamDelete(w http.ResponseWriter, r *http.Request)
func (*SignalsApplication) StreamGet ¶
func (sa *SignalsApplication) StreamGet(w http.ResponseWriter, r *http.Request)
func (*SignalsApplication) StreamUpdate ¶
func (sa *SignalsApplication) StreamUpdate(w http.ResponseWriter, r *http.Request)
func (*SignalsApplication) TriggerEvent ¶
func (sa *SignalsApplication) TriggerEvent(w http.ResponseWriter, _ *http.Request)
func (*SignalsApplication) UpdateStatus ¶
func (sa *SignalsApplication) UpdateStatus(w http.ResponseWriter, r *http.Request)
func (*SignalsApplication) VerificationRequest ¶
func (sa *SignalsApplication) VerificationRequest(w http.ResponseWriter, _ *http.Request)
func (*SignalsApplication) WellKnownSsfConfigurationGet ¶
func (sa *SignalsApplication) WellKnownSsfConfigurationGet(w http.ResponseWriter, _ *http.Request)
func (*SignalsApplication) WellKnownSsfConfigurationIssuerGet ¶
func (sa *SignalsApplication) WellKnownSsfConfigurationIssuerGet(w http.ResponseWriter, r *http.Request)