lib/wstrust-response.js
function scrubRSTRLogMessage(RSTR) {
  var scrubbedRSTR = null;

  var singleLineRSTR = RSTR.replace(/(\r\n|\n|\r)/gm,'');

  var matchResult = assertionRegEx.exec(singleLineRSTR);
  if (null === matchResult) {
    // No Assertion was matched so just return the RSTR as is.
    scrubbedRSTR = singleLineRSTR;
  } else {
    var samlAssertion = matchResult[1];
    var samlAssertionStartTag = matchResult[2];

    scrubbedRSTR = singleLineRSTR.replace(samlAssertion, samlAssertionStartTag + 'ASSERTION CONTENTS REDACTED</saml:Assertion>');
  }

  return 'RSTR Response: ' + scrubbedRSTR;
}
function scrubRSTRLogMessage(RSTR) {
  var scrubbedRSTR = null;

  var singleLineRSTR = RSTR.replace(/(\r\n|\n|\r)/gm,'');

  var matchResult = assertionRegEx.exec(singleLineRSTR);
  if (null === matchResult) {
    // No Assertion was matched so just return the RSTR as is.
    scrubbedRSTR = singleLineRSTR;
  } else {
    var samlAssertion = matchResult[1];
    var samlAssertionStartTag = matchResult[2];

    scrubbedRSTR = singleLineRSTR.replace(samlAssertion, samlAssertionStartTag + 'ASSERTION CONTENTS REDACTED</saml:Assertion>');
  }

  return 'RSTR Response: ' + scrubbedRSTR;
}
function scrubRSTRLogMessage ( RSTR ) { var scrubbedRSTR = null ; var singleLineRSTR = RSTR . replace ( / (\r\n|\n|\r) / gm , '' ) ; var matchResult = assertionRegEx . exec ( singleLineRSTR ) ; if ( null === matchResult ) { // No Assertion was matched so just return the RSTR as is. scrubbedRSTR = singleLineRSTR ; } else { var samlAssertion = matchResult [ 1 ] ; var samlAssertionStartTag = matchResult [ 2 ] ; scrubbedRSTR = singleLineRSTR . replace ( samlAssertion , samlAssertionStartTag + 'ASSERTION CONTENTS REDACTED</saml:Assertion>' ) ; } return 'RSTR Response: ' + scrubbedRSTR ; }
Creates a log message that contains the RSTR scrubbed of the actual SAML assertion.
@private
@return {string} A log message.
Creates a log message that contains the RSTR scrubbed of the actual SAML assertion .