Documentation
¶
Index ¶
- type CidmAPI
- func (o *CidmAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *CidmAPI) Authorizer() runtime.Authorizer
- func (o *CidmAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *CidmAPI) Context() *middleware.Context
- func (o *CidmAPI) DefaultConsumes() string
- func (o *CidmAPI) DefaultProduces() string
- func (o *CidmAPI) Formats() strfmt.Registry
- func (o *CidmAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *CidmAPI) Init()
- func (o *CidmAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *CidmAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *CidmAPI) Serve(builder middleware.Builder) http.Handler
- func (o *CidmAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *CidmAPI) SetDefaultConsumes(mediaType string)
- func (o *CidmAPI) SetDefaultProduces(mediaType string)
- func (o *CidmAPI) SetSpec(spec *loads.Document)
- func (o *CidmAPI) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CidmAPI ¶
type CidmAPI struct {
Middleware func(middleware.Builder) http.Handler
// BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function.
// It has a default implemention 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 implemention 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 implemention 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
// JSONProducer registers a producer for a "application/json" mime type
JSONProducer runtime.Producer
// BearerAuth registers a function that takes a token and returns a principal
// it performs authentication based on an api key Authorization provided in the header
BearerAuth func(string) (interface{}, error)
// APIAuthorizer provides access control (ACL/RBAC/ABAC) by providing access to the request and authenticated principal
APIAuthorizer runtime.Authorizer
// LoginAddLoginDetailsHandler sets the operation handler for the add login details operation
LoginAddLoginDetailsHandler login.AddLoginDetailsHandler
// ResourceAddResourceHandler sets the operation handler for the add resource operation
ResourceAddResourceHandler resource.AddResourceHandler
// TokenAddUserPermissionHandler sets the operation handler for the add user permission operation
TokenAddUserPermissionHandler token.AddUserPermissionHandler
// ResourceDeleteResourceHandler sets the operation handler for the delete resource operation
ResourceDeleteResourceHandler resource.DeleteResourceHandler
// TokenDeleteUserPermissionHandler sets the operation handler for the delete user permission operation
TokenDeleteUserPermissionHandler token.DeleteUserPermissionHandler
// LoginGetLoginHandler sets the operation handler for the get login operation
LoginGetLoginHandler login.GetLoginHandler
// LoginGetLoginCallbackHandler sets the operation handler for the get login callback operation
LoginGetLoginCallbackHandler login.GetLoginCallbackHandler
// LoginGetLoginConfigDetailsHandler sets the operation handler for the get login config details operation
LoginGetLoginConfigDetailsHandler login.GetLoginConfigDetailsHandler
// LoginGetLoginDetailsHandler sets the operation handler for the get login details operation
LoginGetLoginDetailsHandler login.GetLoginDetailsHandler
// LoginGetLoginDetailsByIDHandler sets the operation handler for the get login details by Id operation
LoginGetLoginDetailsByIDHandler login.GetLoginDetailsByIDHandler
// LoginGetLoginMockHandler sets the operation handler for the get login mock operation
LoginGetLoginMockHandler login.GetLoginMockHandler
// ResourceGetResourceByIDHandler sets the operation handler for the get resource by Id operation
ResourceGetResourceByIDHandler resource.GetResourceByIDHandler
// TokenGetUserPermissionHandler sets the operation handler for the get user permission operation
TokenGetUserPermissionHandler token.GetUserPermissionHandler
// TokenTokenValidatPayloadHandler sets the operation handler for the token validat payload operation
TokenTokenValidatPayloadHandler token.TokenValidatPayloadHandler
// TokenTokenValidateHandler sets the operation handler for the token validate operation
TokenTokenValidateHandler token.TokenValidateHandler
// LoginUpdateLoginConfigDetailsHandler sets the operation handler for the update login config details operation
LoginUpdateLoginConfigDetailsHandler login.UpdateLoginConfigDetailsHandler
// LoginUpdateLoginDetailsHandler sets the operation handler for the update login details operation
LoginUpdateLoginDetailsHandler login.UpdateLoginDetailsHandler
// ResourceUpdateResourceHandler sets the operation handler for the update resource operation
ResourceUpdateResourceHandler resource.UpdateResourceHandler
// TokenUpdateUserPermissionHandler sets the operation handler for the update user permission operation
TokenUpdateUserPermissionHandler token.UpdateUserPermissionHandler
// 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
}
CidmAPI This is the base API for Identity Manager microservice. Api documentation available in /api/idm/docs
func NewCidmAPI ¶
NewCidmAPI creates a new Cidm instance
func (*CidmAPI) AuthenticatorsFor ¶
func (o *CidmAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
AuthenticatorsFor gets the authenticators for the specified security schemes
func (*CidmAPI) Authorizer ¶
func (o *CidmAPI) Authorizer() runtime.Authorizer
Authorizer returns the registered authorizer
func (*CidmAPI) ConsumersFor ¶
ConsumersFor gets the consumers for the specified media types
func (*CidmAPI) Context ¶
func (o *CidmAPI) Context() *middleware.Context
Context returns the middleware context for the cidm API
func (*CidmAPI) DefaultConsumes ¶
DefaultConsumes returns the default consumes media type
func (*CidmAPI) DefaultProduces ¶
DefaultProduces returns the default produces media type
func (*CidmAPI) HandlerFor ¶
HandlerFor gets a http.Handler for the provided operation method and path
func (*CidmAPI) Init ¶
func (o *CidmAPI) Init()
Init allows you to just initialize the handler cache, you can then recompose the middelware as you see fit
func (*CidmAPI) ProducersFor ¶
ProducersFor gets the producers for the specified media types
func (*CidmAPI) RegisterFormat ¶
RegisterFormat registers a custom format validator
func (*CidmAPI) Serve ¶
func (o *CidmAPI) 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 (*CidmAPI) ServeErrorFor ¶
ServeErrorFor gets a error handler for a given operation id
func (*CidmAPI) SetDefaultConsumes ¶
SetDefaultConsumes returns the default consumes media type
func (*CidmAPI) SetDefaultProduces ¶
SetDefaultProduces sets the default produces media type