protected NameID getNameID(SAMLMessageContext context, LogoutRequest request)
     throws DecryptionException {
   NameID id;
   if (request.getEncryptedID() != null) {
     Assert.notNull(
         context.getLocalDecrypter(), "Can't decrypt NameID, no decrypter is set in the context");
     id = (NameID) context.getLocalDecrypter().decrypt(request.getEncryptedID());
   } else {
     id = request.getNameID();
   }
   return id;
 }