Skip to content

Commit f80dabc

Browse files
committed
2.11.25 Update web services
1 parent a7fe515 commit f80dabc

File tree

1 file changed

+29
-20
lines changed

1 file changed

+29
-20
lines changed

src/webservices/soap/docs/ws-login.html

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,21 @@ <h2>Example Request Using Burp Repeater</h2>
8080

8181
<h2>Example Request Using <code>curl</code></h2>
8282
<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 '&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
88+
&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:urn=&quot;urn:ws-login&quot;&gt;
89+
&lt;soapenv:Header/&gt;
90+
&lt;soapenv:Body&gt;
91+
&lt;urn:login&gt;
92+
&lt;client_id&gt;fb975a0e0248994221b3a6e87ba92fe9&lt;/client_id&gt;
93+
&lt;client_secret&gt;f1d10934f1525ebfdf0b08a2413a3a3f683eaae3913489c786e496e403ab7bff&lt;/client_secret&gt;
94+
&lt;audience&gt;http://mutillidae.localhost/webservices/soap/ws-user-account.php&lt;/audience&gt;
95+
&lt;/urn:login&gt;
96+
&lt;/soapenv:Body&gt;
97+
&lt;/soapenv:Envelope&gt;'</code></pre>
9498

9599
<p><strong>Instructions:</strong></p>
96100
<ol>
@@ -115,15 +119,20 @@ <h2>Using the JWT Token in Subsequent Requests</h2>
115119

116120
<h3>Example Using curl</h3>
117121
<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 '&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
128+
&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:urn=&quot;urn:ws-user-account&quot;&gt;
129+
&lt;soapenv:Header/&gt;
130+
&lt;soapenv:Body&gt;
131+
&lt;urn:getUser&gt;
132+
&lt;username&gt;some-user&lt;/username&gt;
133+
&lt;/urn:getUser&gt;
134+
&lt;/soapenv:Body&gt;
135+
&lt;/soapenv:Envelope&gt;'</code></pre>
127136

128137
<h3>Example Using Burp Repeater</h3>
129138
<p>To include the token in Burp Suite:</p>

0 commit comments

Comments
 (0)