anchor.diff:              throw({expected_challenge, got, Challenge})
       end.
   
  +%% Throws!
  +-spec wait_for_success(any(), client()) -> ok.
   wait_for_success(Username, Conn) ->
       AuthReply = escalus_connection:get_stanza(Conn, auth_reply),
       case AuthReply#xmlel.name of
  
positive.code:     ok = escalus_connection:send(Conn, Stanza),
      wait_for_success(Username, Conn).
  
  auth_digest_md5(Conn, Props) ->
      ok = escalus_connection:send(Conn, escalus_stanza:auth(<<"DIGEST-MD5">>)),
      ChallengeData = get_challenge(Conn, challenge1),
  
negative.code:     ok = escalus_connection:send(Conn, ResponseStanza2),
      wait_for_success(get_property(username, Props), Conn).
  
  -spec auth_sasl_scram_sha1(client(), user_spec()) -> ok.
  auth_sasl_scram_sha1(Conn, Props) ->
      Username = get_property(username, Props),
      Nonce = base64:encode(crypto:rand_bytes(16)),
  