All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cz.mmsparams.api.validation.JwtResponseValidator Maven / Gradle / Ivy

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