MSPF-563 Disable expiration check (#30)

This commit is contained in:
Andrey Fadeev 2020-06-16 19:12:30 +03:00 committed by GitHub
parent ca0920e8c6
commit c0b9715e2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -317,10 +317,14 @@ check_expiration(_, Exp = 0) ->
Exp;
check_expiration(_, Exp) when is_integer(Exp) ->
case genlib_time:unow() of
Now when Exp > Now ->
Exp;
_ ->
throw({invalid_token, expired})
% Now when Exp > Now ->
% Exp;
% Expiration check is disabled.
% See MSPF-563 for details
_Now ->
Exp
% _ ->
% throw({invalid_token, expired})
end;
check_expiration(C, undefined) ->
throw({invalid_token, {missing, C}});