(request, prop_slug)
return value
Shortcut for getting samlUserData properties generated by python3-saml.
    These can sometimes manifest as lists or strings.
    :param request: HttpRequest
    :param prop_slug: string (property slug)
    :return: string or None
Shortcut for getting samlUserData properties generated by python3-saml.
    These can sometimes manifest as lists or strings.
    :param request: HttpRequest
    :param prop_slug: string (property slug)
    :return: string or None
Shortcut for getting samlUserData properties generated by python3 - saml . These can sometimes manifest as lists or strings . : param request : HttpRequest : param prop_slug : string ( property slug ) : return : string or None
def _get_saml_user_data_property(request, prop_slug):
    """
    Shortcut for getting samlUserData properties generated by python3-saml.
    These can sometimes manifest as lists or strings.
    :param request: HttpRequest
    :param prop_slug: string (property slug)
    :return: string or None
    """
    value = request.session.get('samlUserdata', {}).get(prop_slug)
    if isinstance(value, list):
        # for Azure AD the data is usually returned as a list
        value = value[0] if value else ''
    return value
def _get_saml_user_data_property ( request , prop_slug ) : value = request . session . get ( 'samlUserdata' , { } ) . get ( prop_slug ) if isinstance ( value , list ) : # for Azure AD the data is usually returned as a list value = value [ 0 ] if value else '' return value