@Override
  public ClientAuthData externalClassToModel(ClientAuthRealm clientAuthRealm) {

    ClientAuthData clientAuthData =
        new ClientAuthData(
            clientAuthRealm.getProjectId(),
            clientAuthRealm.getUserId(),
            clientAuthRealm.getValue(),
            clientAuthRealm.getExpiresIn(),
            DateUtils.stringToDateWithFormat(
                clientAuthRealm.getExpiresAt(), DateFormatConstants.DATE_FORMAT_TIME));

    return clientAuthData;
  }
 @Override
 public ClientAuthRealm modelToExternalClass(ClientAuthData clientAuthData) {
   ClientAuthRealm clientAuthRealm = new ClientAuthRealm();
   clientAuthRealm.setExpiresAt(
       DateUtils.dateToStringWithFormat(
           clientAuthData.getExpiresAt(), DateFormatConstants.DATE_FORMAT_TIME));
   clientAuthRealm.setExpiresIn(clientAuthData.getExpiresIn());
   clientAuthRealm.setProjectId(clientAuthData.getProjectId());
   clientAuthRealm.setUserId(clientAuthData.getUserId());
   clientAuthRealm.setValue(clientAuthData.getValue());
   return clientAuthRealm;
 }