protected void success(HttpServletRequest httpRequest, HttpServletResponse httpResponse, String principal, List<Attribute> attributes,
      String authnContextClassUri, DateTime authnInstant, Boolean cacheForSSO) throws ExternalAuthenticationException, IOException {

    SubjectBuilder builder = this.getSubjectBuilder(principal);
    for (Attribute a : attributes) {
      builder.attribute(a);
    }
    builder.authnContextClassRef(authnContextClassUri);

    this.success(httpRequest, httpResponse, builder.build(), authnInstant, cacheForSSO);
  }
protected void success ( HttpServletRequest httpRequest , HttpServletResponse httpResponse , String principal , List < Attribute > attributes , String authnContextClassUri , DateTime authnInstant , Boolean cacheForSSO ) throws ExternalAuthenticationException , IOException { SubjectBuilder builder = this . getSubjectBuilder ( principal ) ; for ( Attribute a : attributes ) { builder . attribute ( a ) ; } builder . authnContextClassRef ( authnContextClassUri ) ; this . success ( httpRequest , httpResponse , builder . build ( ) , authnInstant , cacheForSSO ) ; }
Method that should be invoked to exit the external authentication process with a successful result.

@param httpRequest
the HTTP request
@param httpResponse
the HTTP response
@param principal
the principal that was authenticated
@param attributes
the attributes to release
@param authnContextClassUri
the authentication context class URI (LoA)
@param authnInstant
the authentication instant - if {@code null} the current time will be used
@param cacheForSSO
should the result be cached for later SSO? If {@code null}, see
{@link #success(HttpServletRequest, HttpServletResponse, Subject, DateTime, Boolean)}
@throws ExternalAuthenticationException
for Shibboleth session errors
@throws IOException
for IO errors