<mxfile host="app.diagrams.net"><diagram name="Basic authentication" id="d1"><mxGraphModel dx="1200" dy="800" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1200" pageHeight="745" background="#FFFFFF" math="0" shadow="0"><root><mxCell id="0" /><mxCell id="1" parent="0" /><mxCell id="c2" value="" style="html=1;rounded=0;endArrow=none;endFill=1;startArrow=none;startFill=1;strokeColor=#A19F9D;strokeWidth=1.2;dashed=1;dashPattern=6 4;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="900.0" y="158.0" as="sourcePoint" /><mxPoint x="900.0" y="710.0" as="targetPoint" /></mxGeometry></mxCell><mxCell id="c3" value="" style="html=1;rounded=0;endArrow=none;endFill=1;startArrow=none;startFill=1;strokeColor=#A19F9D;strokeWidth=1.2;dashed=1;dashPattern=6 4;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="300.0" y="158.0" as="sourcePoint" /><mxPoint x="300.0" y="710.0" as="targetPoint" /></mxGeometry></mxCell><mxCell id="c4" value="&lt;b&gt;Basic authentication&lt;/b&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=22;fontColor=#323130;fontFamily=Helvetica;spacing=0;" vertex="1" parent="1"><mxGeometry x="40.0" y="18.0" width="1120.0" height="30.0" as="geometry" /></mxCell><mxCell id="c5" value="&lt;span style=&quot;font-size:13.5px;color:#605E5C&quot;&gt;Username and password travel with every single request&lt;/span&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=15;fontColor=#323130;fontFamily=Helvetica;spacing=0;" vertex="1" parent="1"><mxGeometry x="40.0" y="50.0" width="1120.0" height="22.0" as="geometry" /></mxCell><mxCell id="c6" value="" style="html=1;rounded=0;endArrow=none;endFill=1;startArrow=none;startFill=1;strokeColor=#0078D4;strokeWidth=2;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="40.0" y="82.0" as="sourcePoint" /><mxPoint x="1160.0" y="82.0" as="targetPoint" /></mxGeometry></mxCell><mxCell id="c7" value="&lt;b&gt;Browser&lt;/b&gt;&lt;br&gt;&lt;span style=&quot;font-size:12.5px;color:#605E5C&quot;&gt;user agent&lt;/span&gt;" style="rounded=1;whiteSpace=wrap;html=1;absoluteArcSize=1;arcSize=16;fillColor=#F3F2F1;strokeColor=#8A8886;strokeWidth=1.5;fontColor=#323130;fontSize=14;fontFamily=Helvetica;align=center;verticalAlign=middle;spacingLeft=12;spacingRight=12;spacingTop=0;" vertex="1" parent="1"><mxGeometry x="170.0" y="100.0" width="260.0" height="58.0" as="geometry" /></mxCell><mxCell id="c8" value="&lt;b&gt;Web server / API&lt;/b&gt;&lt;br&gt;&lt;span style=&quot;font-size:12.5px;color:#605E5C&quot;&gt;protected resource&lt;/span&gt;" style="rounded=1;whiteSpace=wrap;html=1;absoluteArcSize=1;arcSize=16;fillColor=#DFF6DD;strokeColor=#107C10;strokeWidth=1.5;fontColor=#323130;fontSize=14;fontFamily=Helvetica;align=center;verticalAlign=middle;spacingLeft=12;spacingRight=12;spacingTop=0;" vertex="1" parent="1"><mxGeometry x="770.0" y="100.0" width="260.0" height="58.0" as="geometry" /></mxCell><mxCell id="c9" value="" style="html=1;rounded=0;endArrow=block;endFill=1;startArrow=none;startFill=1;strokeColor=#323130;strokeWidth=1.6;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="300.0" y="210.0" as="sourcePoint" /><mxPoint x="898.0" y="210.0" as="targetPoint" /></mxGeometry></mxCell><mxCell id="c10" value="1" style="ellipse;whiteSpace=wrap;html=1;fillColor=#0078D4;strokeColor=#FFFFFF;strokeWidth=1.5;fontColor=#FFFFFF;fontStyle=1;fontSize=12;fontFamily=Helvetica;" vertex="1" parent="1"><mxGeometry x="310.0" y="198.0" width="24.0" height="24.0" as="geometry" /></mxCell><mxCell id="c11" value="GET /orders" style="text;html=1;strokeColor=none;fillColor=white;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=12.5;fontColor=#323130;fontFamily=Helvetica;spacing=0;" vertex="1" parent="1"><mxGeometry x="554.5" y="178.8" width="91.0" height="21.2" as="geometry" /></mxCell><mxCell id="c12" value="" style="html=1;rounded=0;endArrow=block;endFill=1;startArrow=none;startFill=1;strokeColor=#323130;strokeWidth=1.6;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="900.0" y="290.0" as="sourcePoint" /><mxPoint x="302.0" y="290.0" as="targetPoint" /></mxGeometry></mxCell><mxCell id="c13" value="2" style="ellipse;whiteSpace=wrap;html=1;fillColor=#0078D4;strokeColor=#FFFFFF;strokeWidth=1.5;fontColor=#FFFFFF;fontStyle=1;fontSize=12;fontFamily=Helvetica;" vertex="1" parent="1"><mxGeometry x="866.0" y="278.0" width="24.0" height="24.0" as="geometry" /></mxCell><mxCell id="c14" value="401 Unauthorized&lt;br&gt;&lt;span style=&quot;font-size:11.0px&quot;&gt;&lt;font face=&quot;Courier New&quot;&gt;WWW-Authenticate: Basic realm=&quot;orders&quot;&lt;/font&gt;&lt;/span&gt;" style="text;html=1;strokeColor=none;fillColor=white;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=12.5;fontColor=#323130;fontFamily=Helvetica;spacing=0;" vertex="1" parent="1"><mxGeometry x="465.5" y="243.6" width="269.0" height="36.4" as="geometry" /></mxCell><mxCell id="c15" value="Browser prompts the user&lt;br&gt;for username and password" style="rounded=1;whiteSpace=wrap;html=1;absoluteArcSize=1;arcSize=16;fillColor=#FFF4CE;strokeColor=#986F0B;strokeWidth=1.5;fontColor=#323130;fontSize=12;fontFamily=Helvetica;align=center;verticalAlign=middle;spacingLeft=12;spacingRight=12;spacingTop=0;" vertex="1" parent="1"><mxGeometry x="155.0" y="318.0" width="290.0" height="50.0" as="geometry" /></mxCell><mxCell id="c16" value="" style="html=1;rounded=0;endArrow=block;endFill=1;startArrow=none;startFill=1;strokeColor=#323130;strokeWidth=1.6;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="300.0" y="465.0" as="sourcePoint" /><mxPoint x="898.0" y="465.0" as="targetPoint" /></mxGeometry></mxCell><mxCell id="c17" value="3" style="ellipse;whiteSpace=wrap;html=1;fillColor=#0078D4;strokeColor=#FFFFFF;strokeWidth=1.5;fontColor=#FFFFFF;fontStyle=1;fontSize=12;fontFamily=Helvetica;" vertex="1" parent="1"><mxGeometry x="310.0" y="453.0" width="24.0" height="24.0" as="geometry" /></mxCell><mxCell id="c18" value="GET /orders&lt;br&gt;&lt;span style=&quot;font-size:11.0px&quot;&gt;&lt;font face=&quot;Courier New&quot;&gt;Authorization: Basic bWFyaW86UEBzc3cwcmQ=&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;span style=&quot;font-size:11.0px;color:#605E5C&quot;&gt;base64(&quot;mario:P@ssw0rd&quot;) – encoded, not encrypted&lt;/span&gt;" style="text;html=1;strokeColor=none;fillColor=white;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=12.5;fontColor=#323130;fontFamily=Helvetica;spacing=0;" vertex="1" parent="1"><mxGeometry x="442.1" y="403.4" width="315.8" height="51.6" as="geometry" /></mxCell><mxCell id="c19" value="Server decodes the header and&lt;br&gt;checks the password – every time" style="rounded=1;whiteSpace=wrap;html=1;absoluteArcSize=1;arcSize=16;fillColor=#FFF4CE;strokeColor=#986F0B;strokeWidth=1.5;fontColor=#323130;fontSize=12;fontFamily=Helvetica;align=center;verticalAlign=middle;spacingLeft=12;spacingRight=12;spacingTop=0;" vertex="1" parent="1"><mxGeometry x="750.0" y="490.0" width="300.0" height="50.0" as="geometry" /></mxCell><mxCell id="c20" value="" style="html=1;rounded=0;endArrow=block;endFill=1;startArrow=none;startFill=1;strokeColor=#323130;strokeWidth=1.6;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="900.0" y="595.0" as="sourcePoint" /><mxPoint x="302.0" y="595.0" as="targetPoint" /></mxGeometry></mxCell><mxCell id="c21" value="4" style="ellipse;whiteSpace=wrap;html=1;fillColor=#0078D4;strokeColor=#FFFFFF;strokeWidth=1.5;fontColor=#FFFFFF;fontStyle=1;fontSize=12;fontFamily=Helvetica;" vertex="1" parent="1"><mxGeometry x="866.0" y="583.0" width="24.0" height="24.0" as="geometry" /></mxCell><mxCell id="c22" value="200 OK" style="text;html=1;strokeColor=none;fillColor=white;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=12.5;fontColor=#323130;fontFamily=Helvetica;spacing=0;" vertex="1" parent="1"><mxGeometry x="572.0" y="563.8" width="56.0" height="21.2" as="geometry" /></mxCell><mxCell id="c23" value="" style="html=1;rounded=0;endArrow=block;endFill=1;startArrow=none;startFill=1;strokeColor=#323130;strokeWidth=1.6;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="300.0" y="680.0" as="sourcePoint" /><mxPoint x="898.0" y="680.0" as="targetPoint" /></mxGeometry></mxCell><mxCell id="c24" value="5" style="ellipse;whiteSpace=wrap;html=1;fillColor=#0078D4;strokeColor=#FFFFFF;strokeWidth=1.5;fontColor=#FFFFFF;fontStyle=1;fontSize=12;fontFamily=Helvetica;" vertex="1" parent="1"><mxGeometry x="310.0" y="668.0" width="24.0" height="24.0" as="geometry" /></mxCell><mxCell id="c25" value="GET /invoices&lt;br&gt;&lt;span style=&quot;font-size:11.0px&quot;&gt;&lt;font face=&quot;Courier New&quot;&gt;Authorization: Basic bWFyaW86UEBzc3cwcmQ=&amp;nbsp; (again)&lt;/font&gt;&lt;/span&gt;" style="text;html=1;strokeColor=none;fillColor=white;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=12.5;fontColor=#323130;fontFamily=Helvetica;spacing=0;" vertex="1" parent="1"><mxGeometry x="425.2" y="633.6" width="349.5" height="36.4" as="geometry" /></mxCell></root></mxGraphModel></diagram></mxfile>