Documentation
¶
Index ¶
- type CredentialProviderAPI
- func (o *CredentialProviderAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *CredentialProviderAPI) Authorizer() runtime.Authorizer
- func (o *CredentialProviderAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *CredentialProviderAPI) Context() *middleware.Context
- func (o *CredentialProviderAPI) DefaultConsumes() string
- func (o *CredentialProviderAPI) DefaultProduces() string
- func (o *CredentialProviderAPI) Formats() strfmt.Registry
- func (o *CredentialProviderAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *CredentialProviderAPI) Init()
- func (o *CredentialProviderAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *CredentialProviderAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)
- func (o *CredentialProviderAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *CredentialProviderAPI) RegisterProducer(mediaType string, producer runtime.Producer)
- func (o *CredentialProviderAPI) Serve(builder middleware.Builder) http.Handler
- func (o *CredentialProviderAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *CredentialProviderAPI) SetDefaultConsumes(mediaType string)
- func (o *CredentialProviderAPI) SetDefaultProduces(mediaType string)
- func (o *CredentialProviderAPI) SetSpec(spec *loads.Document)
- func (o *CredentialProviderAPI) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CredentialProviderAPI ¶
type CredentialProviderAPI struct { Middleware func(middleware.Builder) http.Handler // BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function. // It has a default implementation in the security package, however you can replace it for your particular usage. BasicAuthenticator func(security.UserPassAuthentication) runtime.Authenticator // APIKeyAuthenticator generates a runtime.Authenticator from the supplied token auth function. // It has a default implementation in the security package, however you can replace it for your particular usage. APIKeyAuthenticator func(string, string, security.TokenAuthentication) runtime.Authenticator // BearerAuthenticator generates a runtime.Authenticator from the supplied bearer token auth function. // It has a default implementation in the security package, however you can replace it for your particular usage. BearerAuthenticator func(string, security.ScopedTokenAuthentication) runtime.Authenticator // JSONConsumer registers a consumer for a "application/json" mime type JSONConsumer runtime.Consumer // XMLConsumer registers a consumer for a "application/xml" mime type XMLConsumer runtime.Consumer // JSONProducer registers a producer for a "application/json" mime type JSONProducer runtime.Producer // XMLProducer registers a producer for a "application/xml" mime type XMLProducer runtime.Producer // CredentialCreateCredentialHandler sets the operation handler for the create credential operation CredentialCreateCredentialHandler credential.CreateCredentialHandler // CredentialGetCredentialByIDHandler sets the operation handler for the get credential by Id operation CredentialGetCredentialByIDHandler credential.GetCredentialByIDHandler // CredentialRenewalCredentialHandler sets the operation handler for the renewal credential operation CredentialRenewalCredentialHandler credential.RenewalCredentialHandler // CredentialRevokeCredentialHandler sets the operation handler for the revoke credential operation CredentialRevokeCredentialHandler credential.RevokeCredentialHandler // CredentialSendCredentialHandler sets the operation handler for the send credential operation CredentialSendCredentialHandler credential.SendCredentialHandler // DidValidateDidHandler sets the operation handler for the validate did operation DidValidateDidHandler did.ValidateDidHandler // CredentialVerifyCredentialHandler sets the operation handler for the verify credential operation CredentialVerifyCredentialHandler credential.VerifyCredentialHandler // ServeError is called when an error is received, there is a default handler // but you can set your own with this ServeError func(http.ResponseWriter, *http.Request, error) // ServerShutdown is called when the HTTP(S) server is shut down and done // handling all active connections and does not accept connections any more ServerShutdown func() // Custom command line argument groups with their descriptions CommandLineOptionsGroups []swag.CommandLineOptionsGroup // User defined logger function. Logger func(string, ...interface{}) // contains filtered or unexported fields }
CredentialProviderAPI This is a Provider Credential Server that validates, signs, generates, revokes and updates credential to identify persons, institutions and objects.
The Provider Credential Server sign a credential using its own keys, it is configurable.
The Provider Credential needs to manage its own repository of credentials, default is smart contract that is deployed when server init.
The Credentials are verifiable against blockchain default, but you can configure and choose your proof and revocation list service.
func NewCredentialProviderAPI ¶
func NewCredentialProviderAPI(spec *loads.Document) *CredentialProviderAPI
NewCredentialProviderAPI creates a new CredentialProvider instance
func (*CredentialProviderAPI) AuthenticatorsFor ¶
func (o *CredentialProviderAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
AuthenticatorsFor gets the authenticators for the specified security schemes
func (*CredentialProviderAPI) Authorizer ¶
func (o *CredentialProviderAPI) Authorizer() runtime.Authorizer
Authorizer returns the registered authorizer
func (*CredentialProviderAPI) ConsumersFor ¶
func (o *CredentialProviderAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
ConsumersFor gets the consumers for the specified media types
func (*CredentialProviderAPI) Context ¶
func (o *CredentialProviderAPI) Context() *middleware.Context
Context returns the middleware context for the credential provider API
func (*CredentialProviderAPI) DefaultConsumes ¶
func (o *CredentialProviderAPI) DefaultConsumes() string
DefaultConsumes returns the default consumes media type
func (*CredentialProviderAPI) DefaultProduces ¶
func (o *CredentialProviderAPI) DefaultProduces() string
DefaultProduces returns the default produces media type
func (*CredentialProviderAPI) Formats ¶
func (o *CredentialProviderAPI) Formats() strfmt.Registry
Formats returns the registered string formats
func (*CredentialProviderAPI) HandlerFor ¶
func (o *CredentialProviderAPI) HandlerFor(method, path string) (http.Handler, bool)
HandlerFor gets a http.Handler for the provided operation method and path
func (*CredentialProviderAPI) Init ¶
func (o *CredentialProviderAPI) Init()
Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit
func (*CredentialProviderAPI) ProducersFor ¶
func (o *CredentialProviderAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
ProducersFor gets the producers for the specified media types
func (*CredentialProviderAPI) RegisterConsumer ¶
func (o *CredentialProviderAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)
RegisterConsumer allows you to add (or override) a consumer for a media type.
func (*CredentialProviderAPI) RegisterFormat ¶
func (o *CredentialProviderAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
RegisterFormat registers a custom format validator
func (*CredentialProviderAPI) RegisterProducer ¶
func (o *CredentialProviderAPI) RegisterProducer(mediaType string, producer runtime.Producer)
RegisterProducer allows you to add (or override) a producer for a media type.
func (*CredentialProviderAPI) Serve ¶
func (o *CredentialProviderAPI) Serve(builder middleware.Builder) http.Handler
Serve creates a http handler to serve the API over HTTP can be used directly in http.ListenAndServe(":8000", api.Serve(nil))
func (*CredentialProviderAPI) ServeErrorFor ¶
func (o *CredentialProviderAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
ServeErrorFor gets a error handler for a given operation id
func (*CredentialProviderAPI) SetDefaultConsumes ¶
func (o *CredentialProviderAPI) SetDefaultConsumes(mediaType string)
SetDefaultConsumes returns the default consumes media type
func (*CredentialProviderAPI) SetDefaultProduces ¶
func (o *CredentialProviderAPI) SetDefaultProduces(mediaType string)
SetDefaultProduces sets the default produces media type
func (*CredentialProviderAPI) SetSpec ¶
func (o *CredentialProviderAPI) SetSpec(spec *loads.Document)
SetSpec sets a spec that will be served for the clients.
func (*CredentialProviderAPI) Validate ¶
func (o *CredentialProviderAPI) Validate() error
Validate validates the registrations in the CredentialProviderAPI