code: @Override
      public OptionalThing<USER_BEAN> getSavedUserBean() { // use covariant generic type
          final String key = getUserBeanKey();
          return OptionalThing.ofNullable(sessionManager.getAttribute(key, getUserBeanType()).orElse(null), () -> {
              throwLoginRequiredException("Not found the user in session by the key:" + key); // to login action
          });
      }
docs: ----------------