Skip to content

factory_allowed_auth_handlers

Customize which AuthHandlers are available.

Info

Useful to extend support for custom auth handlers. For more information see Custom Auth

📄 Arguments

Name Type Description
allowed List[AuthHandlerConfig] List of AuthHandlerConfig classes, contains the custom auth handlers.
cat StrayCat Cheshire Cat instance, allows you to use the framework components.

â†Šī¸ Return

Type: List[AuthHandlerConfig]

The list of custom auth handlers.

✍ Example

from cat.mad_hatter.decorators import hook
from typing import List

@hook(priority=0)
def factory_allowed_auth_handlers(allowed: List[AuthHandlerConfig], cat) -> List:
    # Add your custom auth handler configuration here
    allowed.append(CustomAuthHandlerConfig)
    return allowed