Documentation ¶
Index ¶
- Variables
- func GetBasicAuthTokenFromContext(ctx context.Context) (*models.BasicAuthToken, error)
- func GetNamespaceFromContext(ctx context.Context) (*models.Namespace, error)
- func GetOIDCUserFromContext(ctx context.Context) (*auth.User, error)
- func NewBasicAuthMiddleware(userPermissions *models.UserPermissions) fiber.Handler
- func NewNamespaceMiddleware(namespaceRepository repositories.NamespaceRepositoryProvider) fiber.Handler
- func NewOIDCMiddleware(client auth.OIDCClientProvider, ...) fiber.Handler
- type BasicAuthMiddleware
- type OIDCMiddleware
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AdminPrefixRegexp = regexp.MustCompile(`^/admin`) ChooserPrefixRegexp = regexp.MustCompile(`^/chooser|^/$`) MlflowAimPrefixRegexp = regexp.MustCompile(`^/aim/api|^/ajax-api/2.0/mlflow|^/api/2.0/mlflow`) )
regexps to detect requested API.
Functions ¶
func GetBasicAuthTokenFromContext ¶
func GetBasicAuthTokenFromContext(ctx context.Context) (*models.BasicAuthToken, error)
GetBasicAuthTokenFromContext returns Basic Auth Token from the context.
func GetNamespaceFromContext ¶
GetNamespaceFromContext returns models.Namespace object from the context.
func GetOIDCUserFromContext ¶
GetOIDCUserFromContext returns OIDC User object from the context.
func NewBasicAuthMiddleware ¶
func NewBasicAuthMiddleware(userPermissions *models.UserPermissions) fiber.Handler
NewBasicAuthMiddleware creates new Basic Auth middleware logic.
func NewNamespaceMiddleware ¶
func NewNamespaceMiddleware(namespaceRepository repositories.NamespaceRepositoryProvider) fiber.Handler
NewNamespaceMiddleware creates new Middleware instance.
func NewOIDCMiddleware ¶
func NewOIDCMiddleware( client auth.OIDCClientProvider, rolesRepository repositories.RoleRepositoryProvider, ) fiber.Handler
NewOIDCMiddleware creates new OIDC middleware logic.
Types ¶
type BasicAuthMiddleware ¶
type BasicAuthMiddleware struct {
// contains filtered or unexported fields
}
BasicAuthMiddleware represents Basic Auth middleware.
func (BasicAuthMiddleware) Handle ¶
func (m BasicAuthMiddleware) Handle() fiber.Handler
Handle handles OIDC middleware logic.
type OIDCMiddleware ¶
type OIDCMiddleware struct {
// contains filtered or unexported fields
}
OIDCMiddleware represents OIDC middleware.
func (OIDCMiddleware) Handle ¶
func (m OIDCMiddleware) Handle() fiber.Handler
Handle handles OIDC middleware logic.
Click to show internal directories.
Click to hide internal directories.