Documentation
¶
Index ¶
- func Authenticate(h http.Header, cfg config.Config) bool
- func AuthenticateAdmin(h http.Header, cfg config.Config) bool
- func AuthenticateTenant(h http.Header, cfg config.Config) (config.MongoConfig, string, error)
- func IsAdminRestricted(h http.Header, cfg config.Config) bool
- func IsSuperAdminUI(h http.Header, cfg config.Config) bool
- type Auth
- type DbConfItem
- type DbInfoUsers
- type Info
- type InfoStruct
- type Tenant
- type UserItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticateAdmin ¶
AuthenticateAdmin is used to authenticate and administrator of ARGO and allow further CRUD ops wrt the argo_core database (i.e. add a new tenant, modify another tenant's configuration etc)
func AuthenticateTenant ¶
AuthenticateTenant is used to find which tenant the user making the requests belongs to and return the database configuration for that specific tenant. If the api-key in the request is not found in any tenant an empty configuration is returned along with an error
func IsAdminRestricted ¶
IsAdminRestricted resturns a boolean value if an admin user is in restricted mode or not. Admin user in restricted mode has read only access to certain calls
Types ¶
type DbConfItem ¶
type DbInfoUsers ¶
type DbInfoUsers struct {
Info Info `bson:"info"`
DbConf []DbConfItem `bson:"db_conf"`
Users []UserItem `bson:"users"`
}
type InfoStruct ¶
type InfoStruct struct {
Name string `bson:"name"`
}
type Tenant ¶
type Tenant struct {
Info InfoStruct `bson:"info"`
}
Click to show internal directories.
Click to hide internal directories.