Documentation
¶
Index ¶
- Constants
- func CreateAuthMiddleware(cfg *config.Config, log logrus.FieldLogger) (func(http.Handler) http.Handler, error)
- func ParseAuthHeader(authHeader string) (string, bool)
- type AuthNMiddleware
- type AuthZMiddleware
- type K8sToK8sAuth
- type NilAuth
- func (NilAuth) CheckPermission(ctx context.Context, resource string, op string) (bool, error)
- func (a NilAuth) GetAuthConfig() common.AuthConfig
- func (a NilAuth) GetIdentity(ctx context.Context, token string) (*common.Identity, error)
- func (a NilAuth) ValidateToken(ctx context.Context, token string) (bool, error)
Constants ¶
View Source
const (
// DisableAuthEnvKey is the environment variable key used to disable auth when developing.
DisableAuthEnvKey = "FLIGHTCTL_DISABLE_AUTH"
)
Variables ¶
This section is empty.
Functions ¶
func CreateAuthMiddleware ¶
func ParseAuthHeader ¶
Types ¶
type AuthNMiddleware ¶
type AuthNMiddleware interface { ValidateToken(ctx context.Context, token string) (bool, error) GetIdentity(ctx context.Context, token string) (*common.Identity, error) GetAuthConfig() common.AuthConfig }
func GetAuthN ¶
func GetAuthN() AuthNMiddleware
type AuthZMiddleware ¶
type AuthZMiddleware interface {
CheckPermission(ctx context.Context, resource string, op string) (bool, error)
}
func GetAuthZ ¶
func GetAuthZ() AuthZMiddleware
type K8sToK8sAuth ¶
func (K8sToK8sAuth) CheckPermission ¶
type NilAuth ¶
type NilAuth struct{}
func (NilAuth) CheckPermission ¶
func (NilAuth) GetAuthConfig ¶
func (a NilAuth) GetAuthConfig() common.AuthConfig
func (NilAuth) GetIdentity ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.