NGO-DB/ndb-core

View on GitHub
doc/images/new-session-flows/pwd_changed__old_pwd.svg

Summary

Maintainability
Test Coverage
<svg id="mermaid-1564681124014" width="100%" xmlns="http://www.w3.org/2000/svg" height="100%" style="max-width:1250px;" viewBox="-50 -10 1250 730"><style>#mermaid-1564681124014 .label{font-family:trebuchet ms,verdana,arial;color:#333}#mermaid-1564681124014 .node circle,#mermaid-1564681124014 .node ellipse,#mermaid-1564681124014 .node polygon,#mermaid-1564681124014 .node rect{fill:#ececff;stroke:#9370db;stroke-width:1px}#mermaid-1564681124014 .node.clickable{cursor:pointer}#mermaid-1564681124014 .arrowheadPath{fill:#333}#mermaid-1564681124014 .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-1564681124014 .edgeLabel{background-color:#e8e8e8}#mermaid-1564681124014 .cluster rect{fill:#ffffde!important;stroke:#aa3!important;stroke-width:1px!important}#mermaid-1564681124014 .cluster text{fill:#333}#mermaid-1564681124014 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:trebuchet ms,verdana,arial;font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-1564681124014 .actor{stroke:#ccf;fill:#ececff}#mermaid-1564681124014 text.actor{fill:#000;stroke:none}#mermaid-1564681124014 .actor-line{stroke:grey}#mermaid-1564681124014 .messageLine0{marker-end:"url(#arrowhead)"}#mermaid-1564681124014 .messageLine0,#mermaid-1564681124014 .messageLine1{stroke-width:1.5;stroke-dasharray:"2 2";stroke:#333}#mermaid-1564681124014 #arrowhead{fill:#333}#mermaid-1564681124014 #crosshead path{fill:#333!important;stroke:#333!important}#mermaid-1564681124014 .messageText{fill:#333;stroke:none}#mermaid-1564681124014 .labelBox{stroke:#ccf;fill:#ececff}#mermaid-1564681124014 .labelText,#mermaid-1564681124014 .loopText{fill:#000;stroke:none}#mermaid-1564681124014 .loopLine{stroke-width:2;stroke-dasharray:"2 2";marker-end:"url(#arrowhead)";stroke:#ccf}#mermaid-1564681124014 .note{stroke:#aa3;fill:#fff5ad}#mermaid-1564681124014 .noteText{fill:#000;stroke:none;font-family:trebuchet ms,verdana,arial;font-size:14px}#mermaid-1564681124014 .section{stroke:none;opacity:.2}#mermaid-1564681124014 .section0{fill:rgba(102,102,255,.49)}#mermaid-1564681124014 .section2{fill:#fff400}#mermaid-1564681124014 .section1,#mermaid-1564681124014 .section3{fill:#fff;opacity:.2}#mermaid-1564681124014 .sectionTitle0,#mermaid-1564681124014 .sectionTitle1,#mermaid-1564681124014 .sectionTitle2,#mermaid-1564681124014 .sectionTitle3{fill:#333}#mermaid-1564681124014 .sectionTitle{text-anchor:start;font-size:11px;text-height:14px}#mermaid-1564681124014 .grid .tick{stroke:#d3d3d3;opacity:.3;shape-rendering:crispEdges}#mermaid-1564681124014 .grid path{stroke-width:0}#mermaid-1564681124014 .today{fill:none;stroke:red;stroke-width:2px}#mermaid-1564681124014 .task{stroke-width:2}#mermaid-1564681124014 .taskText{text-anchor:middle;font-size:11px}#mermaid-1564681124014 .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px}#mermaid-1564681124014 .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-1564681124014 .taskText0,#mermaid-1564681124014 .taskText1,#mermaid-1564681124014 .taskText2,#mermaid-1564681124014 .taskText3{fill:#fff}#mermaid-1564681124014 .task0,#mermaid-1564681124014 .task1,#mermaid-1564681124014 .task2,#mermaid-1564681124014 .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-1564681124014 .taskTextOutside0,#mermaid-1564681124014 .taskTextOutside1,#mermaid-1564681124014 .taskTextOutside2,#mermaid-1564681124014 .taskTextOutside3{fill:#000}#mermaid-1564681124014 .active0,#mermaid-1564681124014 .active1,#mermaid-1564681124014 .active2,#mermaid-1564681124014 .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-1564681124014 .activeText0,#mermaid-1564681124014 .activeText1,#mermaid-1564681124014 .activeText2,#mermaid-1564681124014 .activeText3{fill:#000!important}#mermaid-1564681124014 .done0,#mermaid-1564681124014 .done1,#mermaid-1564681124014 .done2,#mermaid-1564681124014 .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-1564681124014 .doneText0,#mermaid-1564681124014 .doneText1,#mermaid-1564681124014 .doneText2,#mermaid-1564681124014 .doneText3{fill:#000!important}#mermaid-1564681124014 .crit0,#mermaid-1564681124014 .crit1,#mermaid-1564681124014 .crit2,#mermaid-1564681124014 .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-1564681124014 .activeCrit0,#mermaid-1564681124014 .activeCrit1,#mermaid-1564681124014 .activeCrit2,#mermaid-1564681124014 .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-1564681124014 .doneCrit0,#mermaid-1564681124014 .doneCrit1,#mermaid-1564681124014 .doneCrit2,#mermaid-1564681124014 .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-1564681124014 .activeCritText0,#mermaid-1564681124014 .activeCritText1,#mermaid-1564681124014 .activeCritText2,#mermaid-1564681124014 .activeCritText3,#mermaid-1564681124014 .doneCritText0,#mermaid-1564681124014 .doneCritText1,#mermaid-1564681124014 .doneCritText2,#mermaid-1564681124014 .doneCritText3{fill:#000!important}#mermaid-1564681124014 .titleText{text-anchor:middle;font-size:18px;fill:#000}#mermaid-1564681124014 g.classGroup text{fill:#9370db;stroke:none;font-family:trebuchet ms,verdana,arial;font-size:10px}#mermaid-1564681124014 g.classGroup rect{fill:#ececff;stroke:#9370db}#mermaid-1564681124014 g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-1564681124014 .classLabel .box{stroke:none;stroke-width:0;fill:#ececff;opacity:.5}#mermaid-1564681124014 .classLabel .label{fill:#9370db;font-size:10px}#mermaid-1564681124014 .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-1564681124014 #compositionEnd,#mermaid-1564681124014 #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-1564681124014 #aggregationEnd,#mermaid-1564681124014 #aggregationStart{fill:#ececff;stroke:#9370db;stroke-width:1}#mermaid-1564681124014 #dependencyEnd,#mermaid-1564681124014 #dependencyStart,#mermaid-1564681124014 #extensionEnd,#mermaid-1564681124014 #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-1564681124014 .branch-label,#mermaid-1564681124014 .commit-id,#mermaid-1564681124014 .commit-msg{fill:#d3d3d3;color:#d3d3d3}</style><style>#mermaid-1564681124014 {
    color: rgb(0, 0, 0);
    font: normal normal 400 normal 16px / normal "Times New Roman";
  }</style><g></g><g><line id="actor0" x1="75" y1="5" x2="75" y2="719" class="actor-line" stroke-width="0.5px" stroke="#999"></line><rect x="0" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="75" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle;"><tspan x="75" dy="0">User</tspan></text></g><g><line id="actor1" x1="275" y1="5" x2="275" y2="719" class="actor-line" stroke-width="0.5px" stroke="#999"></line><rect x="200" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="275" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle;"><tspan x="275" dy="0">SyncedSession</tspan></text></g><g><line id="actor2" x1="475" y1="5" x2="475" y2="719" class="actor-line" stroke-width="0.5px" stroke="#999"></line><rect x="400" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="475" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle;"><tspan x="475" dy="0">LocalSession</tspan></text></g><g><line id="actor3" x1="675" y1="5" x2="675" y2="719" class="actor-line" stroke-width="0.5px" stroke="#999"></line><rect x="600" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="675" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle;"><tspan x="675" dy="0">Local PouchDB</tspan></text></g><g><line id="actor4" x1="875" y1="5" x2="875" y2="719" class="actor-line" stroke-width="0.5px" stroke="#999"></line><rect x="800" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="875" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle;"><tspan x="875" dy="0">RemoteSession</tspan></text></g><g><line id="actor5" x1="1075" y1="5" x2="1075" y2="719" class="actor-line" stroke-width="0.5px" stroke="#999"></line><rect x="1000" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="1075" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle;"><tspan x="1075" dy="0">Remote PouchDB</tspan></text></g><defs><marker id="arrowhead" refX="5" refY="2" markerWidth="6" markerHeight="4" orient="auto"><path d="M 0,0 V 4 L6,2 Z"></path></marker></defs><defs><marker id="crosshead" markerWidth="15" markerHeight="8" orient="auto" refX="16" refY="4"><path fill="black" stroke="#000000" stroke-width="1px" d="M 9,2 V 6 L16,4 Z" style="stroke-dasharray: 0, 0;"></path><path fill="none" stroke="#000000" stroke-width="1px" d="M 0,1 L 6,7 M 6,1 L 0,7" style="stroke-dasharray: 0, 0;"></path></marker></defs><g><rect x="70" y="67" fill="#f4f4f4" stroke="#666" width="10" height="567" rx="0" ry="0"></rect></g><g><text x="177.5" y="93" class="messageText" style="text-anchor: middle;">login</text><line x1="80" y1="100" x2="275" y2="100" class="messageLine0" stroke-width="2" stroke="black" marker-end="url(#arrowhead)" style="fill: none;"></line></g><g><rect x="270" y="102" fill="#f4f4f4" stroke="#666" width="10" height="532" rx="0" ry="0"></rect></g><g><text x="377.5" y="128" class="messageText" style="text-anchor: middle;">login</text><line x1="280" y1="135" x2="475" y2="135" class="messageLine0" stroke-width="2" stroke="black" marker-end="url(#arrowhead)" style="fill: none;"></line></g><g><rect x="470" y="137" fill="#f4f4f4" stroke="#666" width="10" height="184" rx="0" ry="0"></rect></g><g><text x="577.5" y="163" class="messageText" style="text-anchor: middle;">login</text><line x1="280" y1="170" x2="875" y2="170" class="messageLine0" stroke-width="2" stroke="black" marker-end="url(#arrowhead)" style="fill: none;"></line></g><g><rect x="870" y="172" fill="#f4f4f4" stroke="#666" width="10" height="335" rx="0" ry="0"></rect></g><g><text x="577.5" y="198" class="messageText" style="text-anchor: middle;">get User</text><line x1="480" y1="205" x2="675" y2="205" class="messageLine0" stroke-width="2" stroke="black" marker-end="url(#arrowhead)" style="fill: none;"></line></g><g><rect x="670" y="207" fill="#f4f4f4" stroke="#666" width="10" height="33" rx="0" ry="0"></rect></g><g><text x="575" y="233" class="messageText" style="text-anchor: middle;">User</text><line x1="670" y1="240" x2="480" y2="240" class="messageLine1" stroke-width="2" stroke="black" marker-end="url(#arrowhead)" style="stroke-dasharray: 3, 3; fill: none;"></line></g><g><rect x="400" y="250" fill="#EDF2AE" stroke="#666" width="150" height="36" rx="0" ry="0" class="note"></rect><text x="396" y="274" fill="black" class="noteText"><tspan x="416" fill="black">LoginState.LOGGED_IN</tspan></text></g><g><text x="375" y="314" class="messageText" style="text-anchor: middle;">LoginState.LOGGED_IN</text><line x1="470" y1="321" x2="280" y2="321" class="messageLine1" stroke-width="2" stroke="black" marker-end="url(#arrowhead)" style="stroke-dasharray: 3, 3; fill: none;"></line></g><g><text x="175" y="349" class="messageText" style="text-anchor: middle;">LoginState.LOGGED_IN</text><line x1="270" y1="356" x2="80" y2="356" class="messageLine1" stroke-width="2" stroke="black" marker-end="url(#arrowhead)" style="stroke-dasharray: 3, 3; fill: none;"></line></g><g><text x="977.5" y="384" class="messageText" style="text-anchor: middle;">login</text><line x1="880" y1="391" x2="1075" y2="391" class="messageLine0" stroke-width="2" stroke="black" marker-end="url(#arrowhead)" style="fill: none;"></line></g><g><rect x="1070" y="393" fill="#f4f4f4" stroke="#666" width="10" height="33" rx="0" ry="0"></rect></g><g><text x="975" y="419" class="messageText" style="text-anchor: middle;">rejected</text><line x1="1070" y1="426" x2="880" y2="426" class="messageLine1" stroke-width="2" stroke="black" marker-end="url(#arrowhead)" style="stroke-dasharray: 3, 3; fill: none;"></line></g><g><rect x="800" y="436" fill="#EDF2AE" stroke="#666" width="150" height="36" rx="0" ry="0" class="note"></rect><text x="796" y="460" fill="black" class="noteText"><tspan x="816" fill="black">ConnectionState.REJECTED</tspan></text></g><g><text x="575" y="500" class="messageText" style="text-anchor: middle;">ConnectionState.REJECTED</text><line x1="870" y1="507" x2="280" y2="507" class="messageLine1" stroke-width="2" stroke="black" marker-end="url(#arrowhead)" style="stroke-dasharray: 3, 3; fill: none;"></line></g><g><text x="377.5" y="535" class="messageText" style="text-anchor: middle;">logout + fail</text><line x1="280" y1="542" x2="475" y2="542" class="messageLine0" stroke-width="2" stroke="black" marker-end="url(#arrowhead)" style="fill: none;"></line></g><g><rect x="400" y="552" fill="#EDF2AE" stroke="#666" width="150" height="36" rx="0" ry="0" class="note"></rect><text x="396" y="576" fill="black" class="noteText"><tspan x="416" fill="black">LoginState.LOGIN_FAILED</tspan></text></g><g><rect x="50" y="598" fill="#EDF2AE" stroke="#666" width="250" height="36" rx="0" ry="0" class="note"></rect><text x="46" y="622" fill="black" class="noteText"><tspan x="66" fill="black">Login Guard rejects</tspan></text></g><g><rect x="0" y="654" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="75" y="686.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle;"><tspan x="75" dy="0">User</tspan></text></g><g><rect x="200" y="654" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="275" y="686.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle;"><tspan x="275" dy="0">SyncedSession</tspan></text></g><g><rect x="400" y="654" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="475" y="686.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle;"><tspan x="475" dy="0">LocalSession</tspan></text></g><g><rect x="600" y="654" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="675" y="686.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle;"><tspan x="675" dy="0">Local PouchDB</tspan></text></g><g><rect x="800" y="654" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="875" y="686.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle;"><tspan x="875" dy="0">RemoteSession</tspan></text></g><g><rect x="1000" y="654" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="1075" y="686.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle;"><tspan x="1075" dy="0">Remote PouchDB</tspan></text></g></svg>