def doAuth(realm):
 return ((digestAuth(realm) + ' ') + basicAuth(realm))

def doAuth ( realm ) : return ( ( digestAuth ( realm ) + ' ' ) + basicAuth ( realm ) )
doauth function returns the challenge string b giving priority over digest and fallback to basic authentication when the browser doesnt support the first one .