diff --git a/apps/roster/src/protocol/micro_auth.erl b/apps/roster/src/protocol/micro_auth.erl index 476d6ff5195b6c89061d1bed56c3adf11ade9a2c..e97661e8f10647619b5b940441e2e44b8201ce83 100644 --- a/apps/roster/src/protocol/micro_auth.erl +++ b/apps/roster/src/protocol/micro_auth.erl @@ -166,8 +166,8 @@ get_token(Headers) -> ?EMPTY_TOKEN -> case proplists:get_value("x-envoy-original-path", Headers, ?EMPTY_TOKEN) of %% If empty, try getting tokens from params headers ?EMPTY_TOKEN -> ?EMPTY_TOKEN; - Params -> - <<"/mqtts?access_token=", Jwt/binary>> = list_to_binary(Params), %% Parse the token from the params + Params -> + [_PathPart, <<"access_token=", Jwt/binary>>] = binary:split(list_to_binary(Params), <<"?">>), %% Parse the token from the params Jwt end; Jwt -> list_to_binary(Jwt)