private void loadJwtSession(Request request){
  Cookie cookie=findJwtSessionCookie(request);
  if (cookie != null) {
    try {
      EncryptedThenSignedJwt jwt=factory.reconstruct(cookie.getValue(),EncryptedThenSignedJwt.class);
      if (!jwt.verify(signingHandler)) {
        dirty=true;
        logger.warn("The session content will be discarded because OpenIG cannot verify " + "the JWT signature from Cookie '{}'.  The incoming session might " + "be forged or come from an older version of OpenIG.",cookieName);
        return;
      }
      jwt.decrypt(pair.getPrivate());
      JwtClaimsSet claimsSet=jwt.getClaimsSet();
      for (      String key : claimsSet.keys()) {
        super.put(key,claimsSet.getClaim(key));
      }
      Number expiryTime=(Number)get(IG_EXP_SESSION_KEY);
      if (expiryTime != null) {
        if (isExpired(expiryTime)) {
          logger.debug("The JWT Session Cookie has expired");
          clear();
        }
      }
 else {
        put(IG_EXP_SESSION_KEY,getNewExpiryTime());
      }
    }
 catch (    JweDecryptionException e) {
      dirty=true;
      logger.warn("The JWT Session Cookie '{}' could not be decrypted. This " + "may be because temporary encryption keys have been used or if the " + "configured encryption keys have changed since the JWT Session Cookie "+ "was created",cookieName,e);
    }
catch (    Exception e) {
      dirty=true;
      logger.warn("Cannot rebuild JWT Session from Cookie '{}'",cookieName,e);
    }
  }
}

private void loadJwtSession ( Request request ) { Cookie cookie = findJwtSessionCookie ( request ) ; if ( cookie != null ) { try { EncryptedThenSignedJwt jwt = factory . reconstruct ( cookie . getValue ( ) , EncryptedThenSignedJwt . class ) ; if ( ! jwt . verify ( signingHandler ) ) { dirty = true ; logger . warn ( "The session content will be discarded because OpenIG cannot verify " + "the JWT signature from Cookie '{}'.  The incoming session might " + "be forged or come from an older version of OpenIG." , cookieName ) ; return ; } jwt . decrypt ( pair . getPrivate ( ) ) ; JwtClaimsSet claimsSet = jwt . getClaimsSet ( ) ; for ( String key : claimsSet . keys ( ) ) { super . put ( key , claimsSet . getClaim ( key ) ) ; } Number expiryTime = ( Number ) get ( IG_EXP_SESSION_KEY ) ; if ( expiryTime != null ) { if ( isExpired ( expiryTime ) ) { logger . debug ( "The JWT Session Cookie has expired" ) ; clear ( ) ; } } else { put ( IG_EXP_SESSION_KEY , getNewExpiryTime ( ) ) ; } } catch ( JweDecryptionException e ) { dirty = true ; logger . warn ( "The JWT Session Cookie '{}' could not be decrypted. This " + "may be because temporary encryption keys have been used or if the " + "configured encryption keys have changed since the JWT Session Cookie " + "was created" , cookieName , e ) ; } catch ( Exception e ) { dirty = true ; logger . warn ( "Cannot rebuild JWT Session from Cookie '{}'" , cookieName , e ) ; } } }
load the session ' s content from the cookie ( if any ) .
