:mod:`magpie.security` ====================== .. py:module:: magpie.security Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: magpie.security.mask_credentials magpie.security.get_auth_config magpie.security.authomatic_setup magpie.security.authomatic_config magpie.security.get_provider_names .. data:: AUTHOMATIC_LOGGER .. data:: LOGGER .. function:: mask_credentials(container: magpie.typedefs.JSON, redact: magpie.typedefs.Str = '[REDACTED]', flags: Optional[List[Str]] = None, parent: Optional[Str] = None) -> magpie.typedefs.JSON Masks away any credential matched against :paramref:`flags` recursively from JSON :paramref:`container`. Matched credential entries are replaced by :paramref:`redact`. List items are all replaced by the same :paramref:`redact` when their :paramref:`parent` field name is matched. :param container: JSON container to mask. If starting with a list on top-level, first level children will not be masked unless parent is provided. :param redact: string by which to replace flagged fields. :param flags: field names (partial matches) to flag for masking. :param parent: reference to contained elements if in a listing format rather than mapping. :return: masked credentials JSON container. .. function:: get_auth_config(container: magpie.typedefs.AnySettingsContainer) -> pyramid.config.Configurator Generates Magpie application configuration with all utilities required for security and access control. .. function:: authomatic_setup(request) .. function:: authomatic_config(request=None) .. function:: get_provider_names()