Created
December 27, 2017 19:29
-
-
Save anacromaniac/8e15f76aaced4ad75a4b2fad241edb57 to your computer and use it in GitHub Desktop.
Chart for Alohomora-3FA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<svg version="1.1" id="mscgenjs__svg" class="mscgenjs__svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="816" height="679.4999771118164" viewBox="0 0 816 679.4999771118164"><desc> | |
# Generated by mscgen_js - https://sverweij.github.io/mscgen_js | |
msc { | |
# options | |
wordwraparcs=on, | |
arcgradient="10", | |
hscale = "2.5"; | |
# entities | |
a [label="Device"], | |
b [label="Server"]; | |
# arcs | |
a => b [label="TLS[ RFID_TAG, JWT(_id) ]"]; | |
b => b [label="VERIFY(JWT)"]; | |
b >> a [label="TLS[ If(JWT invalid) status 401 ]"]; | |
b =>> b [label="VERIFY (_id and RFID_TAG)"]; | |
b >> a [label="TLS[ STATUS 200 OR 401 ]"]; | |
--- [ label = "If status 200 ", ID="1" ]; | |
a =>> a [label="Unlock_PIN_input()"]; | |
a => b [label="TLS[ RFID_TAG, PIN, JWT(_id)]"]; | |
b => b [label="If {RFID_TAG, PIN} in db 200 else 401"]; | |
b >> a [label="TLS[ STATUS 200 || 401 ]"]; | |
--- [ label = "If status 200 ", ID="2" ]; | |
a =>> a [label="Unlock_Door()"]; | |
}</desc><defs><style type="text/css">svg.mscgenjs__svg{font-family:Helvetica,sans-serif;font-size:12px;font-weight:normal;font-style:normal;text-decoration:none;background-color:white;stroke:black;stroke-width:2}.mscgenjs__svg path, .mscgenjs__svg rect{fill:none}.mscgenjs__svg .label-text-background{fill:white;stroke:white;stroke-width:0}.mscgenjs__svg .bglayer{fill:white;stroke:white;stroke-width:0}.mscgenjs__svg line{}.mscgenjs__svg .return, .mscgenjs__svg .comment{stroke-dasharray:5,3}.mscgenjs__svg .inline_expression_divider{stroke-dasharray:10,5}.mscgenjs__svg text{color:inherit;stroke:none;text-anchor:middle}.mscgenjs__svg text.anchor-start{text-anchor:start}.mscgenjs__svg .arrow-marker{overflow:visible}.mscgenjs__svg .arrow-style{stroke-width:1}.mscgenjs__svg .arcrow, .mscgenjs__svg .arcrowomit, .mscgenjs__svg .emphasised{stroke-linecap:butt}.mscgenjs__svg .arcrowomit{stroke-dasharray:2,2}.mscgenjs__svg .box, .mscgenjs__svg .entity{fill:white;stroke-linejoin:round}.mscgenjs__svg .inherit{stroke:inherit;color:inherit}.mscgenjs__svg .inherit-fill{fill:inherit}.mscgenjs__svg .watermark{font-size:48pt;font-weight:bold;opacity:0.14}.mscgenjs__svg text.entity-text{text-decoration:underline;}</style><marker orient="auto" id="mscgenjs__svgcallback-black" class="arrow-marker" viewBox="0 0 10 10" refX="9" refY="3" markerUnits="strokeWidth" markerWidth="10" markerHeight="10"><path d="M 1,1 l 8,2 l-8,2" class="arrow-style" style="stroke-dasharray:100,1;stroke:black"></path></marker><marker orient="auto" id="mscgenjs__svgcallback-l-black" class="arrow-marker" viewBox="0 0 10 10" refX="9" refY="3" markerUnits="strokeWidth" markerWidth="10" markerHeight="10"><path d="M17,1 l-8,2 l 8,2" class="arrow-style" style="stroke-dasharray:100,1;stroke:black"></path></marker><marker orient="auto" id="mscgenjs__svgmethod-black" class="arrow-marker" viewBox="0 0 10 10" refX="9" refY="3" markerUnits="strokeWidth" markerWidth="10" markerHeight="10"><polygon points="1,1 9,3 1,5" class="arrow-style" stroke="black" fill="black"></polygon></marker><marker orient="auto" id="mscgenjs__svgmethod-l-black" class="arrow-marker" viewBox="0 0 10 10" refX="9" refY="3" markerUnits="strokeWidth" markerWidth="10" markerHeight="10"><polygon points="17,1 9,3 17,5" class="arrow-style" stroke="black" fill="black"></polygon></marker></defs><g id="mscgenjs__svg_body" transform="translate(83,3) scale(1,1)"><g id="mscgenjs__svg_background"><rect width="816" height="679.5" x="-83" y="-3" class="bglayer"></rect></g><g id="mscgenjs__svg_arcspans"></g><g id="mscgenjs__svg_lifelines"><line x1="125" y1="38" x2="125" y2="86" class="arcrow"></line><line x1="525" y1="38" x2="525" y2="86" class="arcrow"></line><line x1="125" y1="86" x2="125" y2="134" class="arcrow"></line><line x1="525" y1="86" x2="525" y2="134" class="arcrow"></line><line x1="125" y1="134" x2="125" y2="184.3" class="arcrow"></line><line x1="525" y1="134" x2="525" y2="184.3" class="arcrow"></line><line x1="125" y1="184.3" x2="125" y2="232.3" class="arcrow"></line><line x1="525" y1="184.3" x2="525" y2="232.3" class="arcrow"></line><line x1="125" y1="232.3" x2="125" y2="282.6" class="arcrow"></line><line x1="525" y1="232.3" x2="525" y2="282.6" class="arcrow"></line><line x1="125" y1="282.6" x2="125" y2="330.6" class="arcrow"></line><line x1="525" y1="282.6" x2="525" y2="330.6" class="arcrow"></line><line x1="125" y1="330.6" x2="125" y2="378.6" class="arcrow"></line><line x1="525" y1="330.6" x2="525" y2="378.6" class="arcrow"></line><line x1="125" y1="378.6" x2="125" y2="428.9" class="arcrow"></line><line x1="525" y1="378.6" x2="525" y2="428.9" class="arcrow"></line><line x1="125" y1="428.9" x2="125" y2="476.9" class="arcrow"></line><line x1="525" y1="428.9" x2="525" y2="476.9" class="arcrow"></line><line x1="125" y1="476.9" x2="125" y2="527.2" class="arcrow"></line><line x1="525" y1="476.9" x2="525" y2="527.2" class="arcrow"></line><line x1="125" y1="527.2" x2="125" y2="575.2" class="arcrow"></line><line x1="525" y1="527.2" x2="525" y2="575.2" class="arcrow"></line><line x1="125" y1="575.2" x2="125" y2="623.2" class="arcrow"></line><line x1="525" y1="575.2" x2="525" y2="623.2" class="arcrow"></line><line x1="125" y1="623.2" x2="125" y2="673.5" class="arcrow"></line><line x1="525" y1="623.2" x2="525" y2="673.5" class="arcrow"></line></g><g id="mscgenjs__svg_sequence"><g><g><rect width="250" height="38" class="entity"></rect><g><text x="125" y="23" class="entity-text "><tspan>Device</tspan></text></g></g><g><rect width="250" height="38" x="400" class="entity"></rect><g><text x="525" y="23" class="entity-text "><tspan>Server</tspan></text></g></g></g><g><line x1="125" y1="110" x2="525" y2="120" class="arc directional method" style="stroke:black" marker-end="url(#mscgenjs__svgmethod-black)"></line><g><rect width="148" height="16" x="251" y="98" class="label-text-background"></rect><text x="325" y="110" class="directional-text method-text "><tspan>TLS[ RFID_TAG, JWT(_id) ]</tspan></text></g></g><g><path d="M525,149.55 C725,151.65 725,178.35 525,178.35 " class="arc directional method" style="stroke:black" marker-end="url(#mscgenjs__svgmethod-black)"></path><g><rect width="75" height="16" x="528" y="132.05" class="label-text-background"></rect><text x="528" y="144.05" class="directional-text method-text anchor-start "><tspan>VERIFY(JWT)</tspan></text></g></g><g><line x1="525" y1="208.3" x2="125" y2="218.3" class="arc directional return" style="stroke:black" marker-end="url(#mscgenjs__svgcallback-black)"></line><g><rect width="170" height="16" x="240" y="196.3" class="label-text-background"></rect><text x="325" y="208.3" class="directional-text return-text "><tspan>TLS[ If(JWT invalid) status 401 ]</tspan></text></g></g><g><path d="M525,247.85 C725,249.95 725,276.65 525,276.65 " class="arc directional callback" style="stroke:black" marker-end="url(#mscgenjs__svgcallback-black)"></path><g><rect width="157" height="16" x="528" y="230.35" class="label-text-background"></rect><text x="528" y="242.35" class="directional-text callback-text anchor-start "><tspan>VERIFY (_id and RFID_TAG)</tspan></text></g></g><g><line x1="525" y1="306.6" x2="125" y2="316.6" class="arc directional return" style="stroke:black" marker-end="url(#mscgenjs__svgcallback-black)"></line><g><rect width="150" height="16" x="250" y="294.6" class="label-text-background"></rect><text x="325" y="306.6" class="directional-text return-text "><tspan>TLS[ STATUS 200 OR 401 ]</tspan></text></g></g><g><line x1="0" y1="354.6" x2="650" y2="354.6" class="comment"></line><g><rect width="77" height="16" x="286.5" y="346.6" class="label-text-background"></rect><text x="325" y="358.6" class="empty-text comment-row-text "><tspan>If status 200 </tspan><tspan style="vertical-align:text-top;font-size:0.7em;text-anchor:start;"> [1]</tspan></text></g></g><g><path d="M125,394.15 C325,396.25 325,422.95 125,422.95 " class="arc directional callback" style="stroke:black" marker-end="url(#mscgenjs__svgcallback-black)"></path><g><rect width="107" height="16" x="128" y="376.65" class="label-text-background"></rect><text x="128" y="388.65" class="directional-text callback-text anchor-start "><tspan>Unlock_PIN_input()</tspan></text></g></g><g><line x1="125" y1="452.9" x2="525" y2="462.9" class="arc directional method" style="stroke:black" marker-end="url(#mscgenjs__svgmethod-black)"></line><g><rect width="171" height="16" x="239.5" y="440.9" class="label-text-background"></rect><text x="325" y="452.9" class="directional-text method-text "><tspan>TLS[ RFID_TAG, PIN, JWT(_id)]</tspan></text></g></g><g><path d="M525,492.45 C725,494.55 725,521.25 525,521.25 " class="arc directional method" style="stroke:black" marker-end="url(#mscgenjs__svgmethod-black)"></path><g><rect width="206" height="16" x="528" y="474.95" class="label-text-background"></rect><text x="528" y="486.95" class="directional-text method-text anchor-start "><tspan>If {RFID_TAG, PIN} in db 200 else 401</tspan></text></g></g><g><line x1="525" y1="551.2" x2="125" y2="561.2" class="arc directional return" style="stroke:black" marker-end="url(#mscgenjs__svgcallback-black)"></line><g><rect width="138" height="16" x="256" y="539.2" class="label-text-background"></rect><text x="325" y="551.2" class="directional-text return-text "><tspan>TLS[ STATUS 200 || 401 ]</tspan></text></g></g><g><line x1="0" y1="599.2" x2="650" y2="599.2" class="comment"></line><g><rect width="77" height="16" x="286.5" y="591.2" class="label-text-background"></rect><text x="325" y="603.2" class="empty-text comment-row-text "><tspan>If status 200 </tspan><tspan style="vertical-align:text-top;font-size:0.7em;text-anchor:start;"> [2]</tspan></text></g></g><g><path d="M125,638.75 C325,640.85 325,667.55 125,667.55 " class="arc directional callback" style="stroke:black" marker-end="url(#mscgenjs__svgcallback-black)"></path><g><rect width="80" height="16" x="128" y="621.25" class="label-text-background"></rect><text x="128" y="633.25" class="directional-text callback-text anchor-start "><tspan>Unlock_Door()</tspan></text></g></g></g><g id="mscgenjs__svg_notes"></g><g id="mscgenjs__svg_watermark"></g></g></svg> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment