@@ -80,17 +80,21 @@ <h2>Example Request Using Burp Repeater</h2>
80
80
81
81
< h2 > Example Request Using < code > curl</ code > </ h2 >
82
82
< p > If you prefer using the command line, here’s how to send the same request with < code > curl</ code > :</ p >
83
- < pre > < code > curl -X POST "http://mutillidae.localhost/webservices/soap/ws-login.php" -H "Content-Type: text/xml; charset=utf-8" -H "SOAPAction: "urn:ws-login#login"" --data '< ?xml version="1.0" encoding="UTF-8"?>
84
- < soapenv:Envelope xmlns:soapenv ="http://schemas.xmlsoap.org/soap/envelope/ " xmlns:urn ="urn:ws-login ">
85
- < soapenv:Header />
86
- < soapenv:Body >
87
- < urn:login >
88
- < client _id > fb975a0e0248994221b3a6e87ba92fe9</ client _id>
89
- < client _secret > f1d10934f1525ebfdf0b08a2413a3a3f683eaae3913489c786e496e403ab7bff</ client _secret>
90
- < audience > http://mutillidae.localhost/webservices/soap/ws-user-account.php</ audience >
91
- </ urn:login >
92
- </ soapenv:Body >
93
- </ soapenv:Envelope > '</ code > </ pre >
83
+ < pre > < code >
84
+ curl -X POST "http://mutillidae.localhost/webservices/soap/ws-login.php" \
85
+ -H "Content-Type: text/xml; charset=utf-8" \
86
+ -H "SOAPAction: "urn:ws-login#login"" \
87
+ --data '<?xml version="1.0" encoding="UTF-8"?>
88
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:ws-login">
89
+ <soapenv:Header/>
90
+ <soapenv:Body>
91
+ <urn:login>
92
+ <client_id>fb975a0e0248994221b3a6e87ba92fe9</client_id>
93
+ <client_secret>f1d10934f1525ebfdf0b08a2413a3a3f683eaae3913489c786e496e403ab7bff</client_secret>
94
+ <audience>http://mutillidae.localhost/webservices/soap/ws-user-account.php</audience>
95
+ </urn:login>
96
+ </soapenv:Body>
97
+ </soapenv:Envelope>'</ code > </ pre >
94
98
95
99
< p > < strong > Instructions:</ strong > </ p >
96
100
< ol >
@@ -115,15 +119,20 @@ <h2>Using the JWT Token in Subsequent Requests</h2>
115
119
116
120
< h3 > Example Using curl</ h3 >
117
121
< p > To call an authenticated endpoint, such as < code > ws-user-account</ code > :</ p >
118
- < pre > < code > curl -X POST "http://mutillidae.localhost/webservices/soap/ws-user-account.php" -H "Content-Type: text/xml; charset=utf-8" -H "SOAPAction: "urn:ws-user-account#getUser"" -H "Authorization: Bearer your-jwt-token" --data '< ?xml version="1.0" encoding="UTF-8"?>
119
- < soapenv:Envelope xmlns:soapenv ="http://schemas.xmlsoap.org/soap/envelope/ " xmlns:urn ="urn:ws-user-account ">
120
- < soapenv:Header />
121
- < soapenv:Body >
122
- < urn:getUser >
123
- < username > some-user</ username >
124
- </ urn:getUser >
125
- </ soapenv:Body >
126
- </ soapenv:Envelope > '</ code > </ pre >
122
+ < pre > < code >
123
+ curl -X POST "http://mutillidae.localhost/webservices/soap/ws-user-account.php" \
124
+ -H "Content-Type: text/xml; charset=utf-8" \
125
+ -H "SOAPAction: "urn:ws-user-account#getUser"" \
126
+ -H "Authorization: Bearer your-jwt-token" \
127
+ --data '<?xml version="1.0" encoding="UTF-8"?>
128
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:ws-user-account">
129
+ <soapenv:Header/>
130
+ <soapenv:Body>
131
+ <urn:getUser>
132
+ <username>some-user</username>
133
+ </urn:getUser>
134
+ </soapenv:Body>
135
+ </soapenv:Envelope>'</ code > </ pre >
127
136
128
137
< h3 > Example Using Burp Repeater</ h3 >
129
138
< p > To include the token in Burp Suite:</ p >
0 commit comments