def _extract_username()

in userbeacon/jwt_auth_backend.py [0:0]


    def _extract_username(claims):
        username = claims.get("username")   #adfs(deprecated) uses this
        if username is None:
            username = claims.get("preferred_username") #keycloak and Azure AD use this
        if username is None:
            logger.warning("Could not get username from claims set, expect problems")
        return username