private RequestSecurityTokenResponseType parseIntermediateGssResponse(Node response) throws ParserException {
  RequestSecurityTokenResponseType parsedResponse=null;
  boolean hasRSTRC=hasRSTRC(response);
  if (hasRSTRC) {
    log.debug("Intermediate response contains RSTRC. Parsing RSTR from there.");
    RequestSecurityTokenResponseCollectionType rstrc=responseUnmarshaller.parseStsResponse(response,RequestSecurityTokenResponseCollectionType.class,true);
    parsedResponse=rstrc.getRequestSecurityTokenResponse();
  }
 else {
    log.debug("Intermediate response does not contain RSTRC. Should be direct RSTR.");
    parsedResponse=responseUnmarshaller.parseStsResponse(response,RequestSecurityTokenResponseType.class,true);
  }
  if (parsedResponse == null) {
    log.error("Unable to get RSTR element from response.");
    throw new ParserException(PROCESS_RSTR_ERROR);
  }
  validateContextId(parsedResponse);
  return parsedResponse;
}

private RequestSecurityTokenResponseType parseIntermediateGssResponse ( Node response ) throws ParserException { RequestSecurityTokenResponseType parsedResponse = null ; boolean hasRSTRC = hasRSTRC ( response ) ; if ( hasRSTRC ) { log . debug ( "Intermediate response contains RSTRC. Parsing RSTR from there." ) ; RequestSecurityTokenResponseCollectionType rstrc = responseUnmarshaller . parseStsResponse ( response , RequestSecurityTokenResponseCollectionType . class , true ) ; parsedResponse = rstrc . getRequestSecurityTokenResponse ( ) ; } else { log . debug ( "Intermediate response does not contain RSTRC. Should be direct RSTR." ) ; parsedResponse = responseUnmarshaller . parseStsResponse ( response , RequestSecurityTokenResponseType . class , true ) ; } if ( parsedResponse == null ) { log . error ( "Unable to get RSTR element from response." ) ; throw new ParserException ( PROCESS_RSTR_ERROR ) ; } validateContextId ( parsedResponse ) ; return parsedResponse ; }
helper : parse to a jaxb object an intermediate ( i . e . not containing a token ) response to acquire - token - by - gss - negotiation request .
