cz.mmsparams.api.validation.JwtResponseValidator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of MmsParamsAPI Show documentation
Show all versions of MmsParamsAPI Show documentation
Common library for MmsParams system
The newest version!
package cz.mmsparams.api.validation;
import cz.mmsparams.api.constants.GenericConstants;
import cz.mmsparams.api.http.auth.JwtResponse;
import cz.mmsparams.api.utils.Preconditions;
public class JwtResponseValidator
{
private JwtResponseValidator()
{
}
public static boolean validate(JwtResponse jwtResponse)
{
Preconditions.checkNotNull(jwtResponse, GenericConstants.JWT_RESPONSE);
Preconditions.checkNotNullOrEmpty(jwtResponse.getToken(), GenericConstants.JWTTOKEN);
Preconditions.isGreaterZero(jwtResponse.getExpiry(), GenericConstants.EXPIRY);
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy