Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorCtr = prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "choria_aaa_signer_errors", Help: "Total number of requests that could not be signed", }, []string{"site", "signer"}) AllowedCtr = prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "choria_aaa_signer_allowed", Help: "Total number of requests that were allowed by the authorizer", }, []string{"site", "signer"}) DenyCtr = prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "choria_aaa_signer_denied", Help: "Total number of requests that were denied by the authorizer", }, []string{"site", "signer"}) InvalidTokenCtr = prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "choria_aaa_signer_invalid_token", Help: "Total number of requests that contained invalid tokens", }, []string{"site", "signer"}) )
Functions ¶
func SignHandler ¶
func SignHandler(params operations.PostSignParams) middleware.Responder
SignHandler is a HTTP middleware handler for signing messages using the signer set by SetSigner
Types ¶
type Signer ¶
type Signer interface { // Sign takes a HTTP request and sign it if desired, else setting errors in the sr Sign(req *models.SignRequest) *models.SignResponse // SignRequest signs req based on token SignRequest(req []byte, token string, signature string) (bool, []byte, error) // SetAuditors add auditors to be called after signing actions SetAuditors(...auditors.Auditor) // SetAuthorizer sets the authorizer to use SetAuthorizer(authorizers.Authorizer) }
Signer is a interface that describes software capable of signing a request
Click to show internal directories.
Click to hide internal directories.