*/
public static SAMLUserAuthentication consumeArtifact(String artifact) {
// resolve and consume the artifact
logger.debug("Consuming artifact (" + artifact + ")");
SAMLUserAuthentication authentication = removeArtifactMap(artifact);
if (authentication != null) {
long age =
(new Date().getTime() / MSECS_IN_SEC) - authentication.getTime();
// if expired set to null
if (age > maxArtifactAge) {
logger.debug("Artifact is out of date");
return null;
}