#elem{name = <<"auth">>,
xmlns = <<"urn:ietf:params:xml:ns:xmpp-sasl">>,
cdata = #cdata{label = '$text',
- dec = {base64, decode, []},
+ dec = {base64, mime_decode, []},
enc = {base64, encode, []}},
result = {sasl_auth, '$mechanism', '$text'},
attrs = [#attr{name = <<"mechanism">>,
#elem{name = <<"challenge">>,
xmlns = <<"urn:ietf:params:xml:ns:xmpp-sasl">>,
cdata = #cdata{label = '$text',
- dec = {base64, decode, []},
+ dec = {base64, mime_decode, []},
enc = {base64, encode, []}},
result = {sasl_challenge, '$text'}}).
#elem{name = <<"response">>,
xmlns = <<"urn:ietf:params:xml:ns:xmpp-sasl">>,
cdata = #cdata{label = '$text',
- dec = {base64, decode, []},
+ dec = {base64, mime_decode, []},
enc = {base64, encode, []}},
result = {sasl_response, '$text'}}).
#elem{name = <<"success">>,
xmlns = <<"urn:ietf:params:xml:ns:xmpp-sasl">>,
cdata = #cdata{label = '$text',
- dec = {base64, decode, []},
+ dec = {base64, mime_decode, []},
enc = {base64, encode, []}},
result = {sasl_success, '$text'}}).
-spec re:split(_, _) -> [binary()].
-spec base64:decode(_) -> binary().
+-spec base64:mime_decode(_) -> binary().
-spec dec_host_port(_) -> binary() | inet:ip_address() |
{binary() | inet:ip_address(), non_neg_integer()}.
decode_sasl_success_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_sasl_success_cdata(__TopXMLNS, _val) ->
- case catch base64:decode(_val) of
+ case catch base64:mime_decode(_val) of
{'EXIT', _} ->
erlang:error({xmpp_codec,
{bad_cdata_value, <<>>, <<"success">>, __TopXMLNS}});
decode_sasl_response_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_sasl_response_cdata(__TopXMLNS, _val) ->
- case catch base64:decode(_val) of
+ case catch base64:mime_decode(_val) of
{'EXIT', _} ->
erlang:error({xmpp_codec,
{bad_cdata_value, <<>>, <<"response">>, __TopXMLNS}});
decode_sasl_challenge_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_sasl_challenge_cdata(__TopXMLNS, _val) ->
- case catch base64:decode(_val) of
+ case catch base64:mime_decode(_val) of
{'EXIT', _} ->
erlang:error({xmpp_codec,
{bad_cdata_value, <<>>, <<"challenge">>, __TopXMLNS}});
decode_sasl_auth_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_sasl_auth_cdata(__TopXMLNS, _val) ->
- case catch base64:decode(_val) of
+ case catch base64:mime_decode(_val) of
{'EXIT', _} ->
erlang:error({xmpp_codec,
{bad_cdata_value, <<>>, <<"auth">>, __TopXMLNS}});