code: @Override
    public void initializeContext(ProfileRequestContext<?, ?> context) throws ExternalAutenticationErrorCodeException {
  
      final String logId = this.getLogString(context);
  
      AuthnRequest authnRequest = this.getAuthnRequest(context);
      if (authnRequest == null) {
        log.error("No AuthnRequest available [{}]", logId);
        throw new ExternalAutenticationErrorCodeException(AuthnEventIds.INVALID_AUTHN_CTX, "Missing AuthnRequest");
      }
      if (authnRequest.getExtensions() != null) {
        SignMessage signMessage = authnRequest.getExtensions()
          .getUnknownXMLObjects()
          .stream()
          .filter(SignMessage.class::isInstance)
          .map(SignMessage.class::cast)
          .findFirst()
          .orElse(null);
  
        if (signMessage != null) {
          log.debug("AuthnContext contains SignMessage extension, creating SignMessageContext ... [{}]", logId);
          AuthenticationContext authnContext = authenticationContextLookupStrategy.apply(context);
          if (authnContext == null) {
            log.error("No AuthenticationContext available [{}]", this.getLogString(context));
            throw new ExternalAutenticationErrorCodeException(AuthnEventIds.INVALID_AUTHN_CTX, "Missing AuthenticationContext");
          }
          authnContext.addSubcontext(new SignMessageContext(signMessage), true);
        }
      }
  
    }
docs: {@inheritDoc}