Documentation
¶
Index ¶
- func BasicAuth(user string, pass string) (auth.PrincipalInterface, error)
- func HandleBearerAuth(token string) (auth.PrincipalInterface, error)
- func HasPlugins() bool
- func InitPlugins()
- func LoginAudit(method string, status string, session *auth.SessionInfo, user *auth.UserInfo)
- func ReceiveAudit(p *clu.Context, r *http.Request)
- func SendAdabasPlugins(used time.Duration, ada interface{})
- func SendAuditEnded(started time.Time, r *http.Request)
- func SendAuditError(started time.Time, r *http.Request, err error)
- func ShutdownPlugins()
- type Adabas
- type AdabasLoader
- type Audit
- type AuditLoader
- type Auth
- type AuthLoader
- type ExtendLoader
- type Loader
- type PluginTypes
- type ValidatorLoader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BasicAuth ¶
func BasicAuth(user string, pass string) (auth.PrincipalInterface, error)
BasicAuth handle basic authentication
func HandleBearerAuth ¶
func HandleBearerAuth(token string) (auth.PrincipalInterface, error)
HandleBearerAuth handle bearer authentication
func LoginAudit ¶
LoginAudit login audit
func ReceiveAudit ¶
ReceiveAudit send audit information to plugins
func SendAdabasPlugins ¶
SendAdabasPlugins send adabas information to plugins
func SendAuditEnded ¶
SendAuditEnded send audit information to plugins
func SendAuditError ¶
SendAuditError send audit errors to plugins
Types ¶
type AdabasLoader ¶
AdabasLoader adabas plugin loader structure
type Audit ¶
type Audit interface {
LoginAudit(string, string, *auth.SessionInfo, *auth.UserInfo)
ReceiveAudit(string, string, *http.Request)
SendAudit(time.Duration, string, string, *http.Request)
SendAuditError(time.Duration, string, string, *http.Request, error)
}
Audit auditing method to send to plugin
type AuditLoader ¶
AuditLoader auditing loader structure
type Auth ¶
type Auth interface {
Init() error
Authenticate(principal auth.PrincipalInterface, userName, passwd string) error
Authorize(principal auth.PrincipalInterface, userName, passwd string) error
CheckToken(token string, scopes []string) (auth.PrincipalInterface, error)
}
Auth authenticate and authorize
type AuthLoader ¶
AuthLoader auth loader structure
type ExtendLoader ¶
type ExtendLoader struct {
Loader Loader
Extend server.RestExtend
}
ExtendLoader extend loader plugin structure
type Loader ¶
type Loader interface {
Name() string
Version() string
Types() []PluginTypes
Stop()
}
Loader plugin Loader module to load plugin features
type PluginTypes ¶
type PluginTypes int
PluginTypes different types of plugins for - auditing - database operation
const ( // NoPlugin no plugin but may be used in module NoPlugin PluginTypes = iota // AuditPlugin auditing of RESTful server access AuditPlugin // AdabasPlugin Adabas plugin type AdabasPlugin // AuthPlugin authorize and authorize AuthPlugin // ExtendPlugin extend entry point "/rest/extend" ExtendPlugin // ValidatorPlugin validate actions ValidatorPlugin )
type ValidatorLoader ¶
type ValidatorLoader struct {
Loader Loader
Validator server.RestValidator
}
ValidatorLoader valiadtor loader plugin structure