[pretty] pretty-print the contents of strings

Fixes #250
pull/254/head
Timothy Stack 9 years ago
parent 443053da62
commit 399c78d86d

@ -1,4 +1,4 @@
/* Generated by re2c 0.14.2 on Fri Aug 21 06:57:53 2015 */ /* Generated by re2c 0.14.2 on Wed Aug 26 20:24:23 2015 */
#line 1 "../../lnav2/src/data_scanner_re.re" #line 1 "../../lnav2/src/data_scanner_re.re"
/** /**
* Copyright (c) 2015, Timothy Stack * Copyright (c) 2015, Timothy Stack
@ -209,10 +209,10 @@ yy4:
yyaccept = 0; yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR); yych = *(YYMARKER = ++YYCURSOR);
switch (yych) { switch (yych) {
case '"': goto yy951; case '"': goto yy952;
case '%': case '%':
case '+': goto yy70; case '+': goto yy70;
case '\'': goto yy958; case '\'': goto yy960;
case '-': case '-':
case '.': case '.':
case '_': goto yy67; case '_': goto yy67;
@ -279,7 +279,7 @@ yy4:
case 'x': case 'x':
case 'y': case 'y':
case 'z': goto yy462; case 'z': goto yy462;
case 'e': goto yy964; case 'e': goto yy967;
default: goto yy63; default: goto yy63;
} }
yy5: yy5:
@ -292,10 +292,10 @@ yy6:
yyaccept = 0; yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR); yych = *(YYMARKER = ++YYCURSOR);
switch (yych) { switch (yych) {
case '"': goto yy951; case '"': goto yy952;
case '%': case '%':
case '+': goto yy70; case '+': goto yy70;
case '\'': goto yy958; case '\'': goto yy960;
case '-': case '-':
case '.': case '.':
case '_': goto yy67; case '_': goto yy67;
@ -368,7 +368,7 @@ yy6:
yy7: yy7:
yyaccept = 1; yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR); yych = *(YYMARKER = ++YYCURSOR);
if (yych >= 0x01) goto yy952; if (yych >= 0x01) goto yy953;
yy8: yy8:
#line 215 "../../lnav2/src/data_scanner_re.re" #line 215 "../../lnav2/src/data_scanner_re.re"
{ RET(DT_GARBAGE); } { RET(DT_GARBAGE); }
@ -2049,7 +2049,7 @@ yy61:
case 24: goto yy442; case 24: goto yy442;
case 25: goto yy925; case 25: goto yy925;
case 26: goto yy949; case 26: goto yy949;
default: goto yy956; default: goto yy957;
} }
yy62: yy62:
yyaccept = 0; yyaccept = 0;
@ -17299,7 +17299,6 @@ yy470:
yyaccept = 16; yyaccept = 16;
YYMARKER = ++YYCURSOR; YYMARKER = ++YYCURSOR;
yych = *YYCURSOR; yych = *YYCURSOR;
yy471:
switch (yych) { switch (yych) {
case 0x00: case 0x00:
case '\t': case '\t':
@ -17637,7 +17636,7 @@ yy476:
yy477: yy477:
#line 205 "../../lnav2/src/data_scanner_re.re" #line 205 "../../lnav2/src/data_scanner_re.re"
{ RET(DT_CONSTANT); } { RET(DT_CONSTANT); }
#line 17641 "../../lnav2/src/data_scanner_re.cc" #line 17640 "../../lnav2/src/data_scanner_re.cc"
yy478: yy478:
yych = *++YYCURSOR; yych = *++YYCURSOR;
switch (yych) { switch (yych) {
@ -17890,7 +17889,7 @@ yy482:
yy484: yy484:
#line 145 "../../lnav2/src/data_scanner_re.re" #line 145 "../../lnav2/src/data_scanner_re.re"
{ RET(DT_URL); } { RET(DT_URL); }
#line 17894 "../../lnav2/src/data_scanner_re.cc" #line 17893 "../../lnav2/src/data_scanner_re.cc"
yy485: yy485:
YYCTXMARKER = YYCURSOR + 1; YYCTXMARKER = YYCURSOR + 1;
yyaccept = 0; yyaccept = 0;
@ -21540,7 +21539,7 @@ yy533:
yy534: yy534:
#line 190 "../../lnav2/src/data_scanner_re.re" #line 190 "../../lnav2/src/data_scanner_re.re"
{ RET(DT_UUID); } { RET(DT_UUID); }
#line 21544 "../../lnav2/src/data_scanner_re.cc" #line 21543 "../../lnav2/src/data_scanner_re.cc"
yy535: yy535:
YYCTXMARKER = YYCURSOR + 1; YYCTXMARKER = YYCURSOR + 1;
yych = *++YYCURSOR; yych = *++YYCURSOR;
@ -34660,7 +34659,7 @@ yy765:
RET(DT_HEX_DUMP); RET(DT_HEX_DUMP);
} }
} }
#line 34664 "../../lnav2/src/data_scanner_re.cc" #line 34663 "../../lnav2/src/data_scanner_re.cc"
yy766: yy766:
yych = *++YYCURSOR; yych = *++YYCURSOR;
switch (yych) { switch (yych) {
@ -39207,7 +39206,7 @@ yy834:
{ {
RET(DT_VERSION_NUMBER); RET(DT_VERSION_NUMBER);
} }
#line 39211 "../../lnav2/src/data_scanner_re.cc" #line 39210 "../../lnav2/src/data_scanner_re.cc"
yy835: yy835:
yyaccept = 0; yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR); yych = *(YYMARKER = ++YYCURSOR);
@ -40886,7 +40885,7 @@ yy858:
{ {
RET(DT_IPV4_ADDRESS); RET(DT_IPV4_ADDRESS);
} }
#line 40890 "../../lnav2/src/data_scanner_re.cc" #line 40889 "../../lnav2/src/data_scanner_re.cc"
yy859: yy859:
yyaccept = 22; yyaccept = 22;
yych = *(YYMARKER = ++YYCURSOR); yych = *(YYMARKER = ++YYCURSOR);
@ -41820,7 +41819,7 @@ yy876:
{ {
RET(DT_DATE); RET(DT_DATE);
} }
#line 41824 "../../lnav2/src/data_scanner_re.cc" #line 41823 "../../lnav2/src/data_scanner_re.cc"
yy877: yy877:
yyaccept = 23; yyaccept = 23;
yych = *(YYMARKER = ++YYCURSOR); yych = *(YYMARKER = ++YYCURSOR);
@ -45251,7 +45250,7 @@ yy923:
yy925: yy925:
#line 192 "../../lnav2/src/data_scanner_re.re" #line 192 "../../lnav2/src/data_scanner_re.re"
{ RET(DT_NUMBER); } { RET(DT_NUMBER); }
#line 45255 "../../lnav2/src/data_scanner_re.cc" #line 45254 "../../lnav2/src/data_scanner_re.cc"
yy926: yy926:
yyaccept = 25; yyaccept = 25;
YYMARKER = ++YYCURSOR; YYMARKER = ++YYCURSOR;
@ -46766,7 +46765,13 @@ yy946:
default: goto yy944; default: goto yy944;
} }
yy948: yy948:
++YYCURSOR; yyaccept = 26;
YYMARKER = ++YYCURSOR;
yych = *YYCURSOR;
switch (yych) {
case '\'': goto yy944;
default: goto yy949;
}
yy949: yy949:
#line 133 "../../lnav2/src/data_scanner_re.re" #line 133 "../../lnav2/src/data_scanner_re.re"
{ {
@ -46781,38 +46786,44 @@ yy949:
cap[1].c_end -= 1; cap[1].c_end -= 1;
return true; return true;
} }
#line 46785 "../../lnav2/src/data_scanner_re.cc" #line 46790 "../../lnav2/src/data_scanner_re.cc"
yy950: yy950:
yyaccept = 26; yyaccept = 26;
YYMARKER = ++YYCURSOR; YYMARKER = ++YYCURSOR;
yych = *YYCURSOR; yych = *YYCURSOR;
switch (yych) { switch (yych) {
case 0x00: goto yy949; case 0x00: goto yy949;
case '\'': goto yy948; case '\'': goto yy950;
case '\\': goto yy946; case '\\': goto yy946;
default: goto yy944; default: goto yy944;
} }
yy951: yy952:
++YYCURSOR; ++YYCURSOR;
yych = *YYCURSOR; yych = *YYCURSOR;
yy952: yy953:
switch (yych) { switch (yych) {
case 0x00: goto yy61; case 0x00: goto yy61;
case '"': goto yy955; case '"': goto yy956;
case '\\': goto yy953; case '\\': goto yy954;
default: goto yy951; default: goto yy952;
} }
yy953: yy954:
++YYCURSOR; ++YYCURSOR;
yych = *YYCURSOR; yych = *YYCURSOR;
switch (yych) { switch (yych) {
case '"': goto yy957; case '"': goto yy958;
case '\\': goto yy953; case '\\': goto yy954;
default: goto yy951; default: goto yy952;
} }
yy955:
++YYCURSOR;
yy956: yy956:
yyaccept = 27;
YYMARKER = ++YYCURSOR;
yych = *YYCURSOR;
switch (yych) {
case '"': goto yy952;
default: goto yy957;
}
yy957:
#line 121 "../../lnav2/src/data_scanner_re.re" #line 121 "../../lnav2/src/data_scanner_re.re"
{ {
CAPTURE(DT_QUOTED_STRING); CAPTURE(DT_QUOTED_STRING);
@ -46826,18 +46837,18 @@ yy956:
cap[1].c_end -= 1; cap[1].c_end -= 1;
return true; return true;
} }
#line 46830 "../../lnav2/src/data_scanner_re.cc" #line 46841 "../../lnav2/src/data_scanner_re.cc"
yy957: yy958:
yyaccept = 27; yyaccept = 27;
YYMARKER = ++YYCURSOR; YYMARKER = ++YYCURSOR;
yych = *YYCURSOR; yych = *YYCURSOR;
switch (yych) { switch (yych) {
case 0x00: goto yy956; case 0x00: goto yy957;
case '"': goto yy955; case '"': goto yy958;
case '\\': goto yy953; case '\\': goto yy954;
default: goto yy951; default: goto yy952;
} }
yy958: yy960:
YYCTXMARKER = YYCURSOR + 1; YYCTXMARKER = YYCURSOR + 1;
++YYCURSOR; ++YYCURSOR;
yych = *YYCURSOR; yych = *YYCURSOR;
@ -46852,12 +46863,12 @@ yy958:
case ')': case ')':
case '*': case '*':
case ':': case ':':
case ';': goto yy960; case ';': goto yy962;
case '!': case '!':
case ',': case ',':
case '?': goto yy961; case '?': goto yy963;
case '\'': goto yy963; case '\'': goto yy965;
case '.': goto yy962; case '.': goto yy964;
case '\\': goto yy946; case '\\': goto yy946;
case 'a': case 'a':
case 'b': case 'b':
@ -46884,15 +46895,15 @@ yy958:
case 'w': case 'w':
case 'x': case 'x':
case 'y': case 'y':
case 'z': goto yy958; case 'z': goto yy960;
default: goto yy944; default: goto yy944;
} }
yy960: yy962:
yyaccept = 16; yyaccept = 16;
yych = *(YYMARKER = ++YYCURSOR); yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x00) goto yy468; if (yych <= 0x00) goto yy468;
goto yy945; goto yy945;
yy961: yy963:
yyaccept = 16; yyaccept = 16;
yych = *(YYMARKER = ++YYCURSOR); yych = *(YYMARKER = ++YYCURSOR);
switch (yych) { switch (yych) {
@ -46900,39 +46911,40 @@ yy961:
case '\t': case '\t':
case '\n': case '\n':
case '\r': case '\r':
case ' ': goto yy960; case ' ': goto yy962;
default: goto yy945; default: goto yy945;
} }
yy962: yy964:
yych = *++YYCURSOR; yych = *++YYCURSOR;
switch (yych) { switch (yych) {
case '\t': case '\t':
case '\n': case '\n':
case '\r': case '\r':
case ' ': goto yy960; case ' ': goto yy962;
default: goto yy945; default: goto yy945;
} }
yy963: yy965:
YYCTXMARKER = YYCURSOR + 1; YYCTXMARKER = YYCURSOR + 1;
yyaccept = 26; yyaccept = 26;
yych = *(YYMARKER = ++YYCURSOR); YYMARKER = ++YYCURSOR;
yych = *YYCURSOR;
switch (yych) { switch (yych) {
case 0x00: case 0x00:
case '\t': case '\t':
case '\n': case '\n':
case '\r': case '\r':
case ' ': case ' ':
case '!':
case '"': case '"':
case '\'':
case '(': case '(':
case ')': case ')':
case '*': case '*':
case ',':
case '.':
case ':': case ':':
case ';': case ';': goto yy467;
case '?': case '!':
case ',':
case '?': goto yy469;
case '\'': goto yy966;
case '.': goto yy472;
case 'a': case 'a':
case 'b': case 'b':
case 'c': case 'c':
@ -46958,10 +46970,61 @@ yy963:
case 'w': case 'w':
case 'x': case 'x':
case 'y': case 'y':
case 'z': goto yy471; case 'z': goto yy465;
default: goto yy949; default: goto yy949;
} }
yy964: yy966:
YYCTXMARKER = YYCURSOR + 1;
yyaccept = 16;
YYMARKER = ++YYCURSOR;
yych = *YYCURSOR;
switch (yych) {
case 0x00: goto yy467;
case '\t':
case '\n':
case '\r':
case ' ':
case '"':
case '(':
case ')':
case '*':
case ':':
case ';': goto yy962;
case '!':
case ',':
case '?': goto yy963;
case '\'': goto yy965;
case '.': goto yy964;
case '\\': goto yy946;
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
case 'g':
case 'h':
case 'i':
case 'j':
case 'k':
case 'l':
case 'm':
case 'n':
case 'o':
case 'p':
case 'q':
case 'r':
case 's':
case 't':
case 'u':
case 'v':
case 'w':
case 'x':
case 'y':
case 'z': goto yy960;
default: goto yy944;
}
yy967:
YYCTXMARKER = YYCURSOR + 1; YYCTXMARKER = YYCURSOR + 1;
yyaccept = 0; yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR); yych = *(YYMARKER = ++YYCURSOR);
@ -46982,7 +47045,7 @@ yy964:
case '%': case '%':
case '+': goto yy70; case '+': goto yy70;
case '\'': goto yy470; case '\'': goto yy470;
case '-': goto yy965; case '-': goto yy968;
case '.': goto yy475; case '.': goto yy475;
case '0': case '0':
case '1': case '1':
@ -47051,7 +47114,7 @@ yy964:
case 'z': goto yy462; case 'z': goto yy462;
default: goto yy63; default: goto yy63;
} }
yy965: yy968:
yyaccept = 0; yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR); yych = *(YYMARKER = ++YYCURSOR);
switch (yych) { switch (yych) {
@ -47122,10 +47185,10 @@ yy965:
case 'w': case 'w':
case 'x': case 'x':
case 'y': case 'y':
case 'z': goto yy966; case 'z': goto yy969;
default: goto yy63; default: goto yy63;
} }
yy966: yy969:
yyaccept = 0; yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR); yych = *(YYMARKER = ++YYCURSOR);
switch (yych) { switch (yych) {
@ -47197,10 +47260,10 @@ yy966:
case 'w': case 'w':
case 'x': case 'x':
case 'y': case 'y':
case 'z': goto yy967; case 'z': goto yy970;
default: goto yy63; default: goto yy63;
} }
yy967: yy970:
YYCTXMARKER = YYCURSOR + 1; YYCTXMARKER = YYCURSOR + 1;
yyaccept = 0; yyaccept = 0;
YYMARKER = ++YYCURSOR; YYMARKER = ++YYCURSOR;
@ -47275,7 +47338,7 @@ yy967:
case 'Z': case 'Z':
case '_': goto yy67; case '_': goto yy67;
case '.': goto yy475; case '.': goto yy475;
case ':': goto yy969; case ':': goto yy972;
case '@': goto yy69; case '@': goto yy69;
case 'a': case 'a':
case 'b': case 'b':
@ -47302,10 +47365,10 @@ yy967:
case 'w': case 'w':
case 'x': case 'x':
case 'y': case 'y':
case 'z': goto yy967; case 'z': goto yy970;
default: goto yy62; default: goto yy62;
} }
yy969: yy972:
yyaccept = 16; yyaccept = 16;
yych = *(YYMARKER = ++YYCURSOR); yych = *(YYMARKER = ++YYCURSOR);
switch (yych) { switch (yych) {

@ -118,7 +118,7 @@ bool data_scanner::tokenize2(pcre_context &pc, data_token_t &token_out)
EOF { return false; } EOF { return false; }
("u"|"r")?'"'('\\'.|[^\x00\"])*'"' { ("u"|"r")?'"'('\\'.|'""'|[^\x00\"])*'"' {
CAPTURE(DT_QUOTED_STRING); CAPTURE(DT_QUOTED_STRING);
switch (pi.get_string()[cap[1].c_begin]) { switch (pi.get_string()[cap[1].c_begin]) {
case 'u': case 'u':
@ -130,7 +130,7 @@ bool data_scanner::tokenize2(pcre_context &pc, data_token_t &token_out)
cap[1].c_end -= 1; cap[1].c_end -= 1;
return true; return true;
} }
("u"|"r")?"'"('\\'.|[^\x00\'])*"'" { ("u"|"r")?"'"('\\'.|"''"|[^\x00\'])*"'" {
CAPTURE(DT_QUOTED_STRING); CAPTURE(DT_QUOTED_STRING);
switch (pi.get_string()[cap[1].c_begin]) { switch (pi.get_string()[cap[1].c_begin]) {
case 'u': case 'u':

@ -70,6 +70,10 @@ std::string hash_string(const std::string &str)
size_t unquote(char *dst, const char *str, size_t len) size_t unquote(char *dst, const char *str, size_t len)
{ {
if (str[0] == 'r' || str[0] == 'u') {
str += 1;
len -= 1;
}
char quote_char = str[0]; char quote_char = str[0];
size_t index = 0; size_t index = 0;
@ -80,6 +84,23 @@ size_t unquote(char *dst, const char *str, size_t len)
if (str[lpc] == quote_char) { if (str[lpc] == quote_char) {
lpc += 1; lpc += 1;
} }
else if (str[lpc] == '\\' && (lpc + 1) < len) {
switch (str[lpc] + 1) {
case 'n':
dst[index] = '\n';
break;
case 'r':
dst[index] = '\r';
break;
case 't':
dst[index] = '\t';
break;
default:
dst[index] = str[lpc + 1];
break;
}
lpc += 1;
}
} }
dst[index] = '\0'; dst[index] = '\0';

@ -46,6 +46,7 @@
#include "timer.hh" #include "timer.hh"
#include "ansi_scrubber.hh" #include "ansi_scrubber.hh"
#include "data_scanner.hh" #include "data_scanner.hh"
#include "lnav_util.hh"
extern sig_atomic_t reverse_lookup_enabled; extern sig_atomic_t reverse_lookup_enabled;
@ -65,8 +66,8 @@ public:
pcre_context::capture_t e_capture; pcre_context::capture_t e_capture;
}; };
pretty_printer(data_scanner *ds) pretty_printer(data_scanner *ds, int leading_indent=0)
: pp_leading_indent(0), : pp_leading_indent(leading_indent),
pp_depth(0), pp_depth(0),
pp_line_length(0), pp_line_length(0),
pp_scanner(ds) { pp_scanner(ds) {
@ -271,14 +272,29 @@ private:
if (this->pp_line_length == 0) { if (this->pp_line_length == 0) {
this->append_indent(); this->append_indent();
} }
this->pp_stream << pi.get_substr(&el.e_capture); if (el.e_token == DT_QUOTED_STRING) {
switch (el.e_token) { pcre_input &pi = this->pp_scanner->get_input();
case DT_IPV4_ADDRESS: auto_mem<char> unquoted_str((char *)malloc(pi.pi_length));
case DT_IPV6_ADDRESS: const char *start = pi.get_substr_start(&el.e_capture);
this->convert_ip_address(el); unquote(unquoted_str.in(), start, el.e_capture.length());
break; data_scanner ds(unquoted_str.in());
default: pretty_printer str_pp(&ds, this->pp_leading_indent);
break; std::string result = str_pp.print();
if (result.find('\n') != std::string::npos) {
this->pp_stream << str_pp.print();
} else {
this->pp_stream << pi.get_substr(&el.e_capture);
}
} else {
this->pp_stream << pi.get_substr(&el.e_capture);
switch (el.e_token) {
case DT_IPV4_ADDRESS:
case DT_IPV6_ADDRESS:
this->convert_ip_address(el);
break;
default:
break;
}
} }
this->pp_line_length += el.e_capture.length(); this->pp_line_length += el.e_capture.length();
if (el.e_token == DT_LINE) { if (el.e_token == DT_LINE) {

@ -254,6 +254,7 @@ dist_noinst_DATA = \
mvwattrline_output.0 \ mvwattrline_output.0 \
textfile_json_indented.0 \ textfile_json_indented.0 \
textfile_json_one_line.0 \ textfile_json_one_line.0 \
textfile_quoted_json.0 \
view_colors_output.0 \ view_colors_output.0 \
vt52_curses_input.0 \ vt52_curses_input.0 \
vt52_curses_input.1 \ vt52_curses_input.1 \

@ -405,6 +405,24 @@ check_output "pretty-printer is not working for indented text files" <<EOF
} }
EOF EOF
run_test ${lnav_test} -n \
-c ":switch-to-view pretty" \
${test_dir}/textfile_quoted_json.0
check_output "pretty-printer is not working for quoted text" <<EOF
{
"foo bar": null,
"array": [
1,
2,
3
],
"obj": {
"one": 1,
"two": true
}
}
EOF
run_test ${lnav_test} -n \ run_test ${lnav_test} -n \
-c ":switch-to-view pretty" \ -c ":switch-to-view pretty" \
${test_dir}/logfile_vami.0 ${test_dir}/logfile_vami.0

@ -388,7 +388,7 @@ check_output "" <<EOF
"log_level": "info", "log_level": "info",
"log_mark": 0, "log_mark": 0,
"contextid": "82e87195d704585501", "contextid": "82e87195d704585501",
"data": "http://localhost:8086|/|<samlp:Response xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\" ID=\"s2daac0735bf476f4560aab81104b623bedfb0cbc0\" InResponseTo=\"84cbf2be33f6410bbe55877545a93f02\" Version=\"2.0\" IssueInstant=\"2014-06-15T01:04:52Z\" Destination=\"http://localhost:8086/api/1/rest/admin/org/530e42ccd6f45fd16d0d0717/saml/consume\"><saml:Issuer xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\">http://openam.vagrant.dev/openam</saml:Issuer><samlp:Status xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\">\\\\\\\\n<samlp:StatusCode xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\"\\\\\\\\nValue=\"urn:oasis:names:tc:SAML:2.0:status:Success\">\\\\\\\\n</samlp:StatusCode>\\\\\\\\n</samlp:Status><saml:Assertion xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\" ID=\"s2a0bee0da937e236167e99b209802056033816ac2\" IssueInstant=\"2014-06-15T01:04:52Z\" Version=\"2.0\">\\\\\\\\n<saml:Issuer>http://openam.vagrant.dev/openam</saml:Issuer><ds:Signature xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\">\\\\\\\\n<ds:SignedInfo>\\\\\\\\n<ds:CanonicalizationMethod Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"/>\\\\\\\\n<ds:SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"/>\\\\\\\\n<ds:Reference URI=\"#s2a0bee0da937e236167e99b209802056033816ac2\">\\\\\\\\n<ds:Transforms>\\\\\\\\n<ds:Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"/>\\\\\\\\n<ds:Transform Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"/>\\\\\\\\n</ds:Transforms>\\\\\\\\n<ds:DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"/>\\\\\\\\n<ds:DigestValue>4uSmVzjovUdQd3px/RcnoxQBsqE=</ds:DigestValue>\\\\\\\\n</ds:Reference>\\\\\\\\n</ds:SignedInfo>\\\\\\\\n<ds:SignatureValue>\\\\\\\\nhm/grge36uA6j1OWif2bTcvVTwESjmuJa27NxepW0AiV5YlcsHDl7RAIk6k/CjsSero3bxGbm56m\\\\\\\\nYncOEi9F1Tu7dS0bfx+vhm/kKTPgwZctf4GWn4qQwP+KeoZywbNj9ShsYJ+zPKzXwN4xBSuPjMxP\\\\\\\\nNf5szzjEWpOndQO/uDs=\\\\\\\\n</ds:SignatureValue>\\\\\\\\n<ds:KeyInfo>\\\\\\\\n<ds:X509Data>\\\\\\\\n<ds:X509Certificate>\\\\\\\\nMIICQDCCAakCBEeNB0swDQYJKoZIhvcNAQEEBQAwZzELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNh\\\\\\\\nbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMQwwCgYDVQQKEwNTdW4xEDAOBgNVBAsTB09w\\\\\\\\nZW5TU08xDTALBgNVBAMTBHRlc3QwHhcNMDgwMTE1MTkxOTM5WhcNMTgwMTEyMTkxOTM5WjBnMQsw\\\\\\\\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExDDAK\\\\\\\\nBgNVBAoTA1N1bjEQMA4GA1UECxMHT3BlblNTTzENMAsGA1UEAxMEdGVzdDCBnzANBgkqhkiG9w0B\\\\\\\\nAQEFAAOBjQAwgYkCgYEArSQc/U75GB2AtKhbGS5piiLkmJzqEsp64rDxbMJ+xDrye0EN/q1U5Of+\\\\\\\\nRkDsaN/igkAvV1cuXEgTL6RlafFPcUX7QxDhZBhsYF9pbwtMzi4A4su9hnxIhURebGEmxKW9qJNY\\\\\\\\nJs0Vo5+IgjxuEWnjnnVgHTs1+mq5QYTA7E6ZyL8CAwEAATANBgkqhkiG9w0BAQQFAAOBgQB3Pw/U\\\\\\\\nQzPKTPTYi9upbFXlrAKMwtFf2OW4yvGWWvlcwcNSZJmTJ8ARvVYOMEVNbsT4OFcfu2/PeYoAdiDA\\\\\\\\ncGy/F2Zuj8XJJpuQRSE6PtQqBuDEHjjmOQJ0rV/r8mO1ZCtHRhpZ5zYRjhRC9eCbjx9VrFax0JDC\\\\\\\\n/FfwWigmrW0Y0Q==\\\\\\\\n</ds:X509Certificate>\\\\\\\\n</ds:X509Data>\\\\\\\\n</ds:KeyInfo>\\\\\\\\n</ds:Signature><saml:Subject>\\\\\\\\n<saml:NameID Format=\"urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress\" NameQualifier=\"http://openam.vagrant.dev/openam\">user@example.com</saml:NameID><saml:SubjectConfirmation Method=\"urn:oasis:names:tc:SAML:2.0:cm:bearer\">\\\\\\\\n<saml:SubjectConfirmationData InResponseTo=\"84cbf2be33f6410bbe55877545a93f02\" NotOnOrAfter=\"2014-06-15T01:14:52Z\" Recipient=\"http://localhost:8086/api/1/rest/admin/org/530e42ccd6f45fd16d0d0717/saml/consume\"/></saml:SubjectConfirmation>\\\\\\\\n</saml:Subject><saml:Conditions NotBefore=\"2014-06-15T00:54:52Z\" NotOnOrAfter=\"2014-06-15T01:14:52Z\">\\\\\\\\n<saml:AudienceRestriction>\\\\\\\\n<saml:Audience>http://localhost:8086</saml:Audience>\\\\\\\\n</saml:AudienceRestriction>\\\\\\\\n</saml:Conditions>\\\\\\\\n<saml:AuthnStatement AuthnInstant=\"2014-06-15T01:00:25Z\" SessionIndex=\"s2f9b4d4b453d12b40ef3905cc959cdb40579c2301\"><saml:AuthnContext><saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef></saml:AuthnContext></saml:AuthnStatement></saml:Assertion></samlp:Response>", "data": "http://localhost:8086|/|<samlp:Response xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\" ID=\"s2daac0735bf476f4560aab81104b623bedfb0cbc0\" InResponseTo=\"84cbf2be33f6410bbe55877545a93f02\" Version=\"2.0\" IssueInstant=\"2014-06-15T01:04:52Z\" Destination=\"http://localhost:8086/api/1/rest/admin/org/530e42ccd6f45fd16d0d0717/saml/consume\"><saml:Issuer xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\">http://openam.vagrant.dev/openam</saml:Issuer><samlp:Status xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\">\\\\n<samlp:StatusCode xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\"\\\\nValue=\"urn:oasis:names:tc:SAML:2.0:status:Success\">\\\\n</samlp:StatusCode>\\\\n</samlp:Status><saml:Assertion xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\" ID=\"s2a0bee0da937e236167e99b209802056033816ac2\" IssueInstant=\"2014-06-15T01:04:52Z\" Version=\"2.0\">\\\\n<saml:Issuer>http://openam.vagrant.dev/openam</saml:Issuer><ds:Signature xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\">\\\\n<ds:SignedInfo>\\\\n<ds:CanonicalizationMethod Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"/>\\\\n<ds:SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"/>\\\\n<ds:Reference URI=\"#s2a0bee0da937e236167e99b209802056033816ac2\">\\\\n<ds:Transforms>\\\\n<ds:Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"/>\\\\n<ds:Transform Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"/>\\\\n</ds:Transforms>\\\\n<ds:DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"/>\\\\n<ds:DigestValue>4uSmVzjovUdQd3px/RcnoxQBsqE=</ds:DigestValue>\\\\n</ds:Reference>\\\\n</ds:SignedInfo>\\\\n<ds:SignatureValue>\\\\nhm/grge36uA6j1OWif2bTcvVTwESjmuJa27NxepW0AiV5YlcsHDl7RAIk6k/CjsSero3bxGbm56m\\\\nYncOEi9F1Tu7dS0bfx+vhm/kKTPgwZctf4GWn4qQwP+KeoZywbNj9ShsYJ+zPKzXwN4xBSuPjMxP\\\\nNf5szzjEWpOndQO/uDs=\\\\n</ds:SignatureValue>\\\\n<ds:KeyInfo>\\\\n<ds:X509Data>\\\\n<ds:X509Certificate>\\\\nMIICQDCCAakCBEeNB0swDQYJKoZIhvcNAQEEBQAwZzELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNh\\\\nbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMQwwCgYDVQQKEwNTdW4xEDAOBgNVBAsTB09w\\\\nZW5TU08xDTALBgNVBAMTBHRlc3QwHhcNMDgwMTE1MTkxOTM5WhcNMTgwMTEyMTkxOTM5WjBnMQsw\\\\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExDDAK\\\\nBgNVBAoTA1N1bjEQMA4GA1UECxMHT3BlblNTTzENMAsGA1UEAxMEdGVzdDCBnzANBgkqhkiG9w0B\\\\nAQEFAAOBjQAwgYkCgYEArSQc/U75GB2AtKhbGS5piiLkmJzqEsp64rDxbMJ+xDrye0EN/q1U5Of+\\\\nRkDsaN/igkAvV1cuXEgTL6RlafFPcUX7QxDhZBhsYF9pbwtMzi4A4su9hnxIhURebGEmxKW9qJNY\\\\nJs0Vo5+IgjxuEWnjnnVgHTs1+mq5QYTA7E6ZyL8CAwEAATANBgkqhkiG9w0BAQQFAAOBgQB3Pw/U\\\\nQzPKTPTYi9upbFXlrAKMwtFf2OW4yvGWWvlcwcNSZJmTJ8ARvVYOMEVNbsT4OFcfu2/PeYoAdiDA\\\\ncGy/F2Zuj8XJJpuQRSE6PtQqBuDEHjjmOQJ0rV/r8mO1ZCtHRhpZ5zYRjhRC9eCbjx9VrFax0JDC\\\\n/FfwWigmrW0Y0Q==\\\\n</ds:X509Certificate>\\\\n</ds:X509Data>\\\\n</ds:KeyInfo>\\\\n</ds:Signature><saml:Subject>\\\\n<saml:NameID Format=\"urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress\" NameQualifier=\"http://openam.vagrant.dev/openam\">user@example.com</saml:NameID><saml:SubjectConfirmation Method=\"urn:oasis:names:tc:SAML:2.0:cm:bearer\">\\\\n<saml:SubjectConfirmationData InResponseTo=\"84cbf2be33f6410bbe55877545a93f02\" NotOnOrAfter=\"2014-06-15T01:14:52Z\" Recipient=\"http://localhost:8086/api/1/rest/admin/org/530e42ccd6f45fd16d0d0717/saml/consume\"/></saml:SubjectConfirmation>\\\\n</saml:Subject><saml:Conditions NotBefore=\"2014-06-15T00:54:52Z\" NotOnOrAfter=\"2014-06-15T01:14:52Z\">\\\\n<saml:AudienceRestriction>\\\\n<saml:Audience>http://localhost:8086</saml:Audience>\\\\n</saml:AudienceRestriction>\\\\n</saml:Conditions>\\\\n<saml:AuthnStatement AuthnInstant=\"2014-06-15T01:00:25Z\" SessionIndex=\"s2f9b4d4b453d12b40ef3905cc959cdb40579c2301\"><saml:AuthnContext><saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef></saml:AuthnContext></saml:AuthnStatement></saml:Assertion></samlp:Response>",
"domain": "dc=openam", "domain": "dc=openam",
"hostname": "192.168.33.1\t", "hostname": "192.168.33.1\t",
"ipaddr": "Not Available", "ipaddr": "Not Available",

@ -0,0 +1 @@
'{ "foo bar" : null, "array" : [1, 2, 3], "obj" : { "one" : 1, "two" : true } }'
Loading…
Cancel
Save