Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthRequest ¶ added in v0.8.0
type Authorizer ¶
type Authorizer interface {
Authorize(ctx context.Context, msg AuthRequest) (bool, error)
}
type DashboardAuthorizer ¶ added in v0.8.0
DashboardAuthorizer authorize with cosmo-dashboard login API
func NewDashboardAuthorizer ¶ added in v0.8.0
func NewDashboardAuthorizer(url string, ca []byte) *DashboardAuthorizer
func (*DashboardAuthorizer) Authorize ¶ added in v0.8.0
func (a *DashboardAuthorizer) Authorize(ctx context.Context, msg AuthRequest) (bool, error)
type LdapAuthorizer ¶ added in v0.9.0
type LdapAuthorizer struct { // for connection URL string // URI to your LDAP server/Domain Controller. ldap[s]://host_or_ip[:port] StartTLS bool // Enables StartTLS functionality TlsConfig *tls.Config BindDN string // [for Bind mode] ex: uid=%s,ou=users,dc=example,dc=com. "%s" is replaced by the user name. SearchBindDN string // [for Search mode] The domain name to bind. ex: cn=admin,dc=example,dc=com SearchBindPassword string // [for Search mode] The password to bind. SearchBaseDN string // [for Search mode] Base DN used for all LDAP queries. ex: dc=example,dc=com SearchFilter string // [for Search mode] ex: "(sAMAccountname=%s)" "%s" is replaced by the user name. }
LdapAuthorizer authorize with cosmo user's password secret
func (*LdapAuthorizer) Authorize ¶ added in v0.9.0
func (a *LdapAuthorizer) Authorize(ctx context.Context, msg AuthRequest) (bool, error)
type MockAuthorizer ¶ added in v0.9.0
func NewMockAuthorizer ¶ added in v0.9.0
func NewMockAuthorizer(userPassMap map[string]string) *MockAuthorizer
func (*MockAuthorizer) Authorize ¶ added in v0.9.0
func (a *MockAuthorizer) Authorize(ctx context.Context, msg AuthRequest) (bool, error)
type PasswordSecretAuthorizer ¶ added in v0.5.0
PasswordSecretAuthorizer authorize with cosmo user's password secret
func NewPasswordSecretAuthorizer ¶ added in v0.5.0
func NewPasswordSecretAuthorizer(c client.Client) *PasswordSecretAuthorizer
func (*PasswordSecretAuthorizer) Authorize ¶ added in v0.5.0
func (a *PasswordSecretAuthorizer) Authorize(ctx context.Context, msg AuthRequest) (bool, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.