public boolean isValid(){
  boolean valid=true;
  if (endtime.getTime() < System.currentTimeMillis()) {
    valid=false;
  }
 else   if (starttime != null) {
    if (starttime.getTime() > System.currentTimeMillis()) {
      valid=false;
    }
  }
 else {
    if (authtime.getTime() > System.currentTimeMillis()) {
      valid=false;
    }
  }
  return valid;
}

public boolean isValid ( ) { boolean valid = true ; if ( endtime . getTime ( ) < System . currentTimeMillis ( ) ) { valid = false ; } else if ( starttime != null ) { if ( starttime . getTime ( ) > System . currentTimeMillis ( ) ) { valid = false ; } } else { if ( authtime . getTime ( ) > System . currentTimeMillis ( ) ) { valid = false ; } } return valid ; }
checks if this credential is expired
