code: protected String getExternalAuthenticationKey(HttpServletRequest httpRequest) throws ExternalAuthenticationException {
      String key = (String) httpRequest.getSession().getAttribute(EXTAUTHN_KEY_ATTRIBUTE_NAME);
      if (key == null) {
        throw new ExternalAuthenticationException("No external authentication process is active");
      }
      return key;
    }
docs: Returns the Shibboleth external authentication key for the current session.
  
  @param httpRequest
  the HTTP request
  @return the Shibboleth external authentication key
  @throws ExternalAuthenticationException
  if no active session exists