neetoAuth Internals
3 years ago in HTML
<html><head>
<title>neeto-architecture</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="file:////Users/ghousemohamed/.vscode/extensions/shd101wyy.markdown-preview-enhanced-0.6.1/node_modules/@shd101wyy/mume/dependencies/katex/katex.min.css">
<script type="text/javascript" src="file:////Users/ghousemohamed/.vscode/extensions/shd101wyy.markdown-preview-enhanced-0.6.1/node_modules/@shd101wyy/mume/dependencies/mermaid/mermaid.min.js" charset="UTF-8"></script>
<style>
/**
* prism.js Github theme based on GitHub's theme.
* @author Sam Clarke
*/
code[class*="language-"],
pre[class*="language-"] {
color: #333;
background: none;
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.4;
-moz-tab-size: 8;
-o-tab-size: 8;
tab-size: 8;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
/* Code blocks */
pre[class*="language-"] {
padding: .8em;
overflow: auto;
/* border: 1px solid #ddd; */
border-radius: 3px;
/* background: #fff; */
background: #f5f5f5;
}
/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
background: #f5f5f5;
}
.token.comment,
.token.blockquote {
color: #969896;
}
.token.cdata {
color: #183691;
}
.token.doctype,
.token.punctuation,
.token.variable,
.token.macro.property {
color: #333;
}
.token.operator,
.token.important,
.token.keyword,
.token.rule,
.token.builtin {
color: #a71d5d;
}
.token.string,
.token.url,
.token.regex,
.token.attr-value {
color: #183691;
}
.token.property,
.token.number,
.token.boolean,
.token.entity,
.token.atrule,
.token.constant,
.token.symbol,
.token.command,
.token.code {
color: #0086b3;
}
.token.tag,
.token.selector,
.token.prolog {
color: #63a35c;
}
.token.function,
.token.namespace,
.token.pseudo-element,
.token.class,
.token.class-name,
.token.pseudo-class,
.token.id,
.token.url-reference .token.variable,
.token.attr-name {
color: #795da3;
}
.token.entity {
cursor: help;
}
.token.title,
.token.title .token.punctuation {
font-weight: bold;
color: #1d3e81;
}
.token.list {
color: #ed6a43;
}
.token.inserted {
background-color: #eaffea;
color: #55a532;
}
.token.deleted {
background-color: #ffecec;
color: #bd2c00;
}
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
/* JSON */
.language-json .token.property {
color: #183691;
}
.language-markup .token.tag .token.punctuation {
color: #333;
}
/* CSS */
code.language-css,
.language-css .token.function {
color: #0086b3;
}
/* YAML */
.language-yaml .token.atrule {
color: #63a35c;
}
code.language-yaml {
color: #183691;
}
/* Ruby */
.language-ruby .token.function {
color: #333;
}
/* Markdown */
.language-markdown .token.url {
color: #795da3;
}
/* Makefile */
.language-makefile .token.symbol {
color: #795da3;
}
.language-makefile .token.variable {
color: #183691;
}
.language-makefile .token.builtin {
color: #0086b3;
}
/* Bash */
.language-bash .token.keyword {
color: #0086b3;
}
/* highlight */
pre[data-line] {
position: relative;
padding: 1em 0 1em 3em;
}
pre[data-line] .line-highlight-wrapper {
position: absolute;
top: 0;
left: 0;
background-color: transparent;
display: block;
width: 100%;
}
pre[data-line] .line-highlight {
position: absolute;
left: 0;
right: 0;
padding: inherit 0;
margin-top: 1em;
background: hsla(24, 20%, 50%,.08);
background: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0));
pointer-events: none;
line-height: inherit;
white-space: pre;
}
pre[data-line] .line-highlight:before,
pre[data-line] .line-highlight[data-end]:after {
content: attr(data-start);
position: absolute;
top: .4em;
left: .6em;
min-width: 1em;
padding: 0 .5em;
background-color: hsla(24, 20%, 50%,.4);
color: hsl(24, 20%, 95%);
font: bold 65%/1.5 sans-serif;
text-align: center;
vertical-align: .3em;
border-radius: 999px;
text-shadow: none;
box-shadow: 0 1px white;
}
pre[data-line] .line-highlight[data-end]:after {
content: attr(data-end);
top: auto;
bottom: .4em;
}html body{font-family:"Helvetica Neue",Helvetica,"Segoe UI",Arial,freesans,sans-serif;font-size:16px;line-height:1.6;color:#333;background-color:#fff;overflow:initial;box-sizing:border-box;word-wrap:break-word}html body>:first-child{margin-top:0}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{line-height:1.2;margin-top:1em;margin-bottom:16px;color:#000}html body h1{font-size:2.25em;font-weight:300;padding-bottom:.3em}html body h2{font-size:1.75em;font-weight:400;padding-bottom:.3em}html body h3{font-size:1.5em;font-weight:500}html body h4{font-size:1.25em;font-weight:600}html body h5{font-size:1.1em;font-weight:600}html body h6{font-size:1em;font-weight:600}html body h1,html body h2,html body h3,html body h4,html body h5{font-weight:600}html body h5{font-size:1em}html body h6{color:#5c5c5c}html body strong{color:#000}html body del{color:#5c5c5c}html body a:not([href]){color:inherit;text-decoration:none}html body a{color:#08c;text-decoration:none}html body a:hover{color:#00a3f5;text-decoration:none}html body img{max-width:100%}html body>p{margin-top:0;margin-bottom:16px;word-wrap:break-word}html body>ul,html body>ol{margin-bottom:16px}html body ul,html body ol{padding-left:2em}html body ul.no-list,html body ol.no-list{padding:0;list-style-type:none}html body ul ul,html body ul ol,html body ol ol,html body ol ul{margin-top:0;margin-bottom:0}html body li{margin-bottom:0}html body li.task-list-item{list-style:none}html body li>p{margin-top:0;margin-bottom:0}html body .task-list-item-checkbox{margin:0 .2em .25em -1.8em;vertical-align:middle}html body .task-list-item-checkbox:hover{cursor:pointer}html body blockquote{margin:16px 0;font-size:inherit;padding:0 15px;color:#5c5c5c;background-color:#f0f0f0;border-left:4px solid #d6d6d6}html body blockquote>:first-child{margin-top:0}html body blockquote>:last-child{margin-bottom:0}html body hr{height:4px;margin:32px 0;background-color:#d6d6d6;border:0 none}html body table{margin:10px 0 15px 0;border-collapse:collapse;border-spacing:0;display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}html body table th{font-weight:bold;color:#000}html body table td,html body table th{border:1px solid #d6d6d6;padding:6px 13px}html body dl{padding:0}html body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:bold}html body dl dd{padding:0 16px;margin-bottom:16px}html body code{font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:.85em !important;color:#000;background-color:#f0f0f0;border-radius:3px;padding:.2em 0}html body code::before,html body code::after{letter-spacing:-0.2em;content:"\00a0"}html body pre>code{padding:0;margin:0;font-size:.85em !important;word-break:normal;white-space:pre;background:transparent;border:0}html body .highlight{margin-bottom:16px}html body .highlight pre,html body pre{padding:1em;overflow:auto;font-size:.85em !important;line-height:1.45;border:#d6d6d6;border-radius:3px}html body .highlight pre{margin-bottom:0;word-break:normal}html body pre code,html body pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}html body pre code:before,html body pre tt:before,html body pre code:after,html body pre tt:after{content:normal}html body p,html body blockquote,html body ul,html body ol,html body dl,html body pre{margin-top:0;margin-bottom:16px}html body kbd{color:#000;border:1px solid #d6d6d6;border-bottom:2px solid #c7c7c7;padding:2px 4px;background-color:#f0f0f0;border-radius:3px}@media print{html body{background-color:#fff}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{color:#000;page-break-after:avoid}html body blockquote{color:#5c5c5c}html body pre{page-break-inside:avoid}html body table{display:table}html body img{display:block;max-width:100%;max-height:100%}html body pre,html body code{word-wrap:break-word;white-space:pre}}.markdown-preview{width:100%;height:100%;box-sizing:border-box}.markdown-preview .pagebreak,.markdown-preview .newpage{page-break-before:always}.markdown-preview pre.line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}.markdown-preview pre.line-numbers>code{position:relative}.markdown-preview pre.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:1em;font-size:100%;left:0;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.markdown-preview pre.line-numbers .line-numbers-rows>span{pointer-events:none;display:block;counter-increment:linenumber}.markdown-preview pre.line-numbers .line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}.markdown-preview .mathjax-exps .MathJax_Display{text-align:center !important}.markdown-preview:not([for="preview"]) .code-chunk .btn-group{display:none}.markdown-preview:not([for="preview"]) .code-chunk .status{display:none}.markdown-preview:not([for="preview"]) .code-chunk .output-div{margin-bottom:16px}.scrollbar-style::-webkit-scrollbar{width:8px}.scrollbar-style::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}.scrollbar-style::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,0.66);border:4px solid rgba(150,150,150,0.66);background-clip:content-box}html body[for="html-export"]:not([data-presentation-mode]){position:relative;width:100%;height:100%;top:0;left:0;margin:0;padding:0;overflow:auto}html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{position:relative;top:0}@media screen and (min-width:914px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{padding:2em calc(50% - 457px + 2em)}}@media screen and (max-width:914px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{font-size:14px !important;padding:1em}}@media print{html body[for="html-export"]:not([data-presentation-mode]) #sidebar-toc-btn{display:none}}html body[for="html-export"]:not([data-presentation-mode]) #sidebar-toc-btn{position:fixed;bottom:8px;left:8px;font-size:28px;cursor:pointer;color:inherit;z-index:99;width:32px;text-align:center;opacity:.4}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] #sidebar-toc-btn{opacity:1}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc{position:fixed;top:0;left:0;width:300px;height:100%;padding:32px 0 48px 0;font-size:14px;box-shadow:0 0 4px rgba(150,150,150,0.33);box-sizing:border-box;overflow:auto;background-color:inherit}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar{width:8px}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,0.66);border:4px solid rgba(150,150,150,0.66);background-clip:content-box}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc a{text-decoration:none}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc ul{padding:0 1.6em;margin-top:.8em}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc li{margin-bottom:.8em}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc ul{list-style-type:none}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{left:300px;width:calc(100% - 300px);padding:2em calc(50% - 457px - 150px);margin:0;box-sizing:border-box}@media screen and (max-width:1274px){html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{width:100%}}html body[for="html-export"]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .markdown-preview{left:50%;transform:translateX(-50%)}html body[for="html-export"]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .md-sidebar-toc{display:none}
/* Please visit the URL below for more information: */
/* https://shd101wyy.github.io/markdown-preview-enhanced/#/customize-css */
</style>
</head>
<body for="html-export">
<div class="mume markdown-preview " style="
padding: 50px;
">
<h1 class="mume-header" id="neeto-architecture">neeto Architecture</h1>
<h2 class="mume-header" id="neetoauth-internals">neetoAuth Internals</h2>
<p>Essentially, neetoAuth is an OAuth provider for all the neeto applications. It provides a single stop authentication solution for all the neeto applications by using the OAuth 2.0 protocol.</p>
<p>From the authentication perspective, neetoAuth is the main authentication application. Internally, neetoAuth uses devise, omniauth-oauth2 and doorkeeper gems to implement OAuth 2.0 authentication and Single Sign on for its neeto applications. Devise allows us to define custom oauth authentication strategy for omniauth based authentication. And neetoAuth uses the doorkeeper gem to provide a custom OAuth2.0 authentication strategy to devise (Specifics about custom authentication strategy is written below).</p>
<p>From the neeto application's perspective, neetoAuth's database is the source of truth for the Organization and User tables. And all applications infer Organization data, User data, API keys and other necessary data. The Organization and Users are created in each neeto application when a new organization has been created and are updated whenever any field in a row has been updated. The neeto application interfaces with neetoAuth in the following ways:</p>
<ol>
<li>Login Flow</li>
<li>Sign up Flow</li>
<li>Creating organizations and updating information for a particular organization when data has been updated</li>
<li>Creating users and updating users whenever a user's profile has been updated</li>
<li>Fetching information about what roles are available in each neeto application</li>
<li>Credentials verification API for mobile</li>
<li>Fetching information about other neeto applications</li>
<li>Restricting access to a user who has not been given access for an app or the organization itself</li>
<li>Disabling the organization, so that the public cannot access the application</li>
<li>Single Sign out ( or Logout) - Which logs out the user from all the neeto application</li>
</ol>
<h2 class="mume-header" id="neeto_sso-gem">neeto_sso gem</h2>
<p>The neeto_sso gem is an adapter which is present in all the neeto applications so that the neeto application and neetoAuth can communicate with each other for SSO (Single Sign On), data fetching, and data synchronization.</p>
<h2 class="mume-header" id="how-does-oauth-20-authentication-with-doorkeeper-work">How does OAuth 2.0 Authentication with Doorkeeper work?</h2>
<h4 class="mume-header" id="single-sign-on-flow-for-web">Single Sign On Flow for Web</h4>
<p>Note: If the sequence diagram is not visible in the Github <a href="http://README.md">README.md</a>, the <a href="http://README.md">README.md</a> with sequence diagram can viewed in VS Code with <code>Markdown Preview Enhanced</code> extension. Or the file can be viewed in <a href="https://stackedit.io/app#">stackedit</a></p>
<p>The following sequence diagram shows how the login strategy is handled using the OAuth2.0 protocol and Doorkeeper gem.</p>
<div class="mermaid" data-processed="true"><svg id="mermaid-1636573639469" width="100%" xmlns="http://www.w3.org/2000/svg" height="1127" style="max-width: 1943px;" viewBox="-50 -50 1943 1167"><style>#mermaid-1636573639469{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-1636573639469 .error-icon{fill:#552222;}#mermaid-1636573639469 .error-text{fill:#552222;stroke:#552222;}#mermaid-1636573639469 .edge-thickness-normal{stroke-width:2px;}#mermaid-1636573639469 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-1636573639469 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-1636573639469 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-1636573639469 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-1636573639469 .marker{fill:#333333;stroke:#333333;}#mermaid-1636573639469 .marker.cross{stroke:#333333;}#mermaid-1636573639469 svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-1636573639469 .actor{stroke:hsl(259.6261682243,59.7765363128%,87.9019607843%);fill:#ECECFF;}#mermaid-1636573639469 text.actor &gt; tspan{fill:black;stroke:none;}#mermaid-1636573639469 .actor-line{stroke:grey;}#mermaid-1636573639469 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-1636573639469 .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-1636573639469 #arrowhead path{fill:#333;stroke:#333;}#mermaid-1636573639469 .sequenceNumber{fill:white;}#mermaid-1636573639469 #sequencenumber{fill:#333;}#mermaid-1636573639469 #crosshead path{fill:#333;stroke:#333;}#mermaid-1636573639469 .messageText{fill:#333;stroke:#333;}#mermaid-1636573639469 .labelBox{stroke:hsl(259.6261682243,59.7765363128%,87.9019607843%);fill:#ECECFF;}#mermaid-1636573639469 .labelText,#mermaid-1636573639469 .labelText &gt; tspan{fill:black;stroke:none;}#mermaid-1636573639469 .loopText,#mermaid-1636573639469 .loopText &gt; tspan{fill:black;stroke:none;}#mermaid-1636573639469 .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243,59.7765363128%,87.9019607843%);fill:hsl(259.6261682243,59.7765363128%,87.9019607843%);}#mermaid-1636573639469 .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-1636573639469 .noteText,#mermaid-1636573639469 .noteText &gt; tspan{fill:black;stroke:none;}#mermaid-1636573639469 .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-1636573639469 .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-1636573639469 .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-1636573639469:root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}</style><g></g><g><line id="actor0" x1="75" y1="5" x2="75" y2="1116" 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; font-size: 14px; font-weight: 400; font-family: Open-Sans, &quot;sans-serif&quot;;"><tspan x="75" dy="0">Browser</tspan></text></g><g><line id="actor1" x1="412" y1="5" x2="412" y2="1116" class="actor-line" stroke-width="0.5px" stroke="#999"></line><rect x="337" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="412" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, &quot;sans-serif&quot;;"><tspan x="412" dy="0">neeto Application</tspan></text></g><g><line id="actor2" x1="1108" y1="5" x2="1108" y2="1116" class="actor-line" stroke-width="0.5px" stroke="#999"></line><rect x="1033" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="1108" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, &quot;sans-serif&quot;;"><tspan x="1108" dy="0">neetoAuth</tspan></text></g><g><line id="actor3" x1="1714" y1="5" x2="1714" y2="1116" class="actor-line" stroke-width="0.5px" stroke="#999"></line><rect x="1639" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="1714" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, &quot;sans-serif&quot;;"><tspan x="1714" dy="0">neeto Application 2</tspan></text></g><defs><marker id="arrowhead" refX="9" refY="5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"><path d="M 0 0 L 10 5 L 0 10 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><defs><marker id="filled-head" refX="18" refY="7" markerWidth="20" markerHeight="28" orient="auto"><path d="M 18,7 L9,13 L14,7 L9,1 Z"></path></marker></defs><defs><marker id="sequencenumber" refX="15" refY="15" markerWidth="60" markerHeight="40" orient="auto"><circle cx="15" cy="15" r="6"></circle></marker></defs><text x="244" y="80" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">Access neeto App</text><line x1="75" y1="113" x2="412" y2="113" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="412" y="128" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">redirect to /users/auth/doorkeeper to authenticate user using doorkeeper</text><path d="M 412,161 C 472,151 472,191 412,181" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></path><text x="760" y="206" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">neeto application redirects to neetoAuth /oauth/authorize to check if user is logged in</text><line x1="412" y1="239" x2="1108" y2="239" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="1108" y="254" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">Redirect to /login for login</text><path d="M 1108,287 C 1168,277 1168,317 1108,307" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></path><text x="1108" y="332" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">Redirect to /oauth/authorize with authenticated params which is used to create</text><path d="M 1108,365 C 1168,355 1168,395 1108,385" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></path><text x="760" y="410" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">After logging in neetoAuth, the user is redirected back to the neeto application</text><line x1="1108" y1="443" x2="412" y2="443" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="760" y="458" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">exchange access token with code, POST /oauth/token</text><line x1="412" y1="491" x2="1108" y2="491" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="1108" y="506" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">generate access token and refresh token for user session</text><path d="M 1108,539 C 1168,529 1168,569 1108,559" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></path><text x="760" y="584" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">response access token</text><line x1="1108" y1="617" x2="412" y2="617" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="244" y="632" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">write access token to browser cookie</text><line x1="412" y1="665" x2="75" y2="665" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="895" y="680" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">Access another neeto application after authenticating with neetoAuth</text><line x1="75" y1="713" x2="1714" y2="713" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="1714" y="728" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">redirect to /users/auth/doorkeeper</text><path d="M 1714,761 C 1774,751 1774,791 1714,781" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></path><text x="1411" y="806" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">Doorkeeper redirects to neetoAuth GET /oauth/authorize</text><line x1="1714" y1="839" x2="1108" y2="839" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="1411" y="854" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">Redirects user back to neeto Application 2, since user is already logged in.</text><line x1="1108" y1="887" x2="1714" y2="887" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="1411" y="902" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">exchange access token with code, POST /oauth/token</text><line x1="1714" y1="935" x2="1108" y2="935" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="1411" y="950" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">response access token</text><line x1="1108" y1="983" x2="1714" y2="983" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="895" y="998" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">write access token to browser cookie</text><line x1="1714" y1="1031" x2="75" y2="1031" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><g><rect x="0" y="1051" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="75" y="1083.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, &quot;sans-serif&quot;;"><tspan x="75" dy="0">Browser</tspan></text></g><g><rect x="337" y="1051" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="412" y="1083.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, &quot;sans-serif&quot;;"><tspan x="412" dy="0">neeto Application</tspan></text></g><g><rect x="1033" y="1051" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="1108" y="1083.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, &quot;sans-serif&quot;;"><tspan x="1108" dy="0">neetoAuth</tspan></text></g><g><rect x="1639" y="1051" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="1714" y="1083.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, &quot;sans-serif&quot;;"><tspan x="1714" dy="0">neeto Application 2</tspan></text></g><text x="821.5" y="-25">Login Flow for Web</text></svg></div><h4 class="mume-header" id="login-flow-for-mobile-apps">Login Flow for Mobile Apps</h4>
<div class="mermaid" data-processed="true"><svg id="mermaid-1636573639524" width="100%" xmlns="http://www.w3.org/2000/svg" height="623" style="max-width: 1626px;" viewBox="-266 -50 1626 663"><style>#mermaid-1636573639524{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-1636573639524 .error-icon{fill:#552222;}#mermaid-1636573639524 .error-text{fill:#552222;stroke:#552222;}#mermaid-1636573639524 .edge-thickness-normal{stroke-width:2px;}#mermaid-1636573639524 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-1636573639524 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-1636573639524 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-1636573639524 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-1636573639524 .marker{fill:#333333;stroke:#333333;}#mermaid-1636573639524 .marker.cross{stroke:#333333;}#mermaid-1636573639524 svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-1636573639524 .actor{stroke:hsl(259.6261682243,59.7765363128%,87.9019607843%);fill:#ECECFF;}#mermaid-1636573639524 text.actor &gt; tspan{fill:black;stroke:none;}#mermaid-1636573639524 .actor-line{stroke:grey;}#mermaid-1636573639524 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-1636573639524 .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-1636573639524 #arrowhead path{fill:#333;stroke:#333;}#mermaid-1636573639524 .sequenceNumber{fill:white;}#mermaid-1636573639524 #sequencenumber{fill:#333;}#mermaid-1636573639524 #crosshead path{fill:#333;stroke:#333;}#mermaid-1636573639524 .messageText{fill:#333;stroke:#333;}#mermaid-1636573639524 .labelBox{stroke:hsl(259.6261682243,59.7765363128%,87.9019607843%);fill:#ECECFF;}#mermaid-1636573639524 .labelText,#mermaid-1636573639524 .labelText &gt; tspan{fill:black;stroke:none;}#mermaid-1636573639524 .loopText,#mermaid-1636573639524 .loopText &gt; tspan{fill:black;stroke:none;}#mermaid-1636573639524 .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243,59.7765363128%,87.9019607843%);fill:hsl(259.6261682243,59.7765363128%,87.9019607843%);}#mermaid-1636573639524 .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-1636573639524 .noteText,#mermaid-1636573639524 .noteText &gt; tspan{fill:black;stroke:none;}#mermaid-1636573639524 .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-1636573639524 .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-1636573639524 .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-1636573639524:root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}</style><g></g><g><line id="actor4" x1="75" y1="5" x2="75" y2="612" 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; font-size: 14px; font-weight: 400; font-family: Open-Sans, &quot;sans-serif&quot;;"><tspan x="75" dy="0">Mobile App</tspan></text></g><g><line id="actor5" x1="765" y1="5" x2="765" y2="612" class="actor-line" stroke-width="0.5px" stroke="#999"></line><rect x="685" y="0" fill="#eaeaea" stroke="#666" width="160" height="65" rx="3" ry="3" class="actor"></rect><text x="765" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, &quot;sans-serif&quot;;"><tspan x="765" dy="0">neeto Application Server</tspan></text></g><g><line id="actor6" x1="1235" y1="5" x2="1235" y2="612" class="actor-line" stroke-width="0.5px" stroke="#999"></line><rect x="1160" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="1235" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, &quot;sans-serif&quot;;"><tspan x="1235" dy="0">neetoAuth</tspan></text></g><defs><marker id="arrowhead" refX="9" refY="5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"><path d="M 0 0 L 10 5 L 0 10 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><defs><marker id="filled-head" refX="18" refY="7" markerWidth="20" markerHeight="28" orient="auto"><path d="M 18,7 L9,13 L14,7 L9,1 Z"></path></marker></defs><defs><marker id="sequencenumber" refX="15" refY="15" markerWidth="60" markerHeight="40" orient="auto"><circle cx="15" cy="15" r="6"></circle></marker></defs><text x="420" y="80" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">Send login credentials</text><line x1="75" y1="113" x2="765" y2="113" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="1000" y="128" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">forwards credentials to neetoAuth server</text><line x1="765" y1="161" x2="1235" y2="161" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="1000" y="176" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">Responds with :unauthorized if credentials were invalid</text><line x1="1235" y1="209" x2="765" y2="209" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="1000" y="224" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">Responds with :success response if credentials are valid</text><line x1="1235" y1="257" x2="765" y2="257" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="420" y="272" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">Responds with success response with email, token, and user_id if credentials are valid</text><line x1="765" y1="305" x2="75" y2="305" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="1000" y="320" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">Responds with :success response</text><line x1="1235" y1="353" x2="765" y2="353" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="420" y="368" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">Responds with success response with email, token, and user_id if credentials are valid</text><line x1="765" y1="401" x2="75" y2="401" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="75" y="416" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">Sets email and token in headers of outgoing requests to neeto Application Server</text><path d="M 75,449 C 135,439 135,479 75,469" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></path><text x="420" y="494" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">Request with x-auth-token and x-auth-email</text><line x1="75" y1="527" x2="765" y2="527" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><g><rect x="0" y="547" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="75" y="579.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, &quot;sans-serif&quot;;"><tspan x="75" dy="0">Mobile App</tspan></text></g><g><rect x="685" y="547" fill="#eaeaea" stroke="#666" width="160" height="65" rx="3" ry="3" class="actor"></rect><text x="765" y="579.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, &quot;sans-serif&quot;;"><tspan x="765" dy="0">neeto Application Server</tspan></text></g><g><rect x="1160" y="547" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="1235" y="579.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, &quot;sans-serif&quot;;"><tspan x="1235" dy="0">neetoAuth</tspan></text></g><text x="663" y="-25">Login Flow for Mobile</text></svg></div><h4 class="mume-header" id="single-logout-flow">Single Logout Flow</h4>
<p>WIP.</p>
<h2 class="mume-header" id="how-does-neeto_sso-integrates-with-each-neeto-application-and-neetoauth">How does neeto_sso integrates with each neeto application and neetoAuth?</h2>
<div class="mermaid" data-processed="true"><svg id="mermaid-1636573639555" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="444.75909423828125" style="max-width: 1115.95703125px;" viewBox="0 0 1115.95703125 444.75909423828125"><style>#mermaid-1636573639555{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-1636573639555 .error-icon{fill:#552222;}#mermaid-1636573639555 .error-text{fill:#552222;stroke:#552222;}#mermaid-1636573639555 .edge-thickness-normal{stroke-width:2px;}#mermaid-1636573639555 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-1636573639555 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-1636573639555 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-1636573639555 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-1636573639555 .marker{fill:#333333;stroke:#333333;}#mermaid-1636573639555 .marker.cross{stroke:#333333;}#mermaid-1636573639555 svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-1636573639555 .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-1636573639555 .cluster-label text{fill:#333;}#mermaid-1636573639555 .cluster-label span{color:#333;}#mermaid-1636573639555 .label text,#mermaid-1636573639555 span{fill:#333;color:#333;}#mermaid-1636573639555 .node rect,#mermaid-1636573639555 .node circle,#mermaid-1636573639555 .node ellipse,#mermaid-1636573639555 .node polygon,#mermaid-1636573639555 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-1636573639555 .node .label{text-align:center;}#mermaid-1636573639555 .node.clickable{cursor:pointer;}#mermaid-1636573639555 .arrowheadPath{fill:#333333;}#mermaid-1636573639555 .edgePath .path{stroke:#333333;stroke-width:1.5px;}#mermaid-1636573639555 .flowchart-link{stroke:#333333;fill:none;}#mermaid-1636573639555 .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-1636573639555 .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-1636573639555 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-1636573639555 .cluster text{fill:#333;}#mermaid-1636573639555 .cluster span{color:#333;}#mermaid-1636573639555 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80,100%,96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-1636573639555:root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}</style><g transform="translate(0, 0)"><marker id="flowchart-pointEnd" class="marker flowchart" viewBox="0 0 10 10" refX="9" refY="5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"></path></marker><marker id="flowchart-pointStart" class="marker flowchart" viewBox="0 0 10 10" refX="0" refY="5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"><path d="M 0 5 L 10 10 L 10 0 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"></path></marker><marker id="flowchart-circleEnd" class="marker flowchart" viewBox="0 0 10 10" refX="11" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"></circle></marker><marker id="flowchart-circleStart" class="marker flowchart" viewBox="0 0 10 10" refX="-1" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"></circle></marker><marker id="flowchart-crossEnd" class="marker cross flowchart" viewBox="0 0 11 11" refX="12" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"></path></marker><marker id="flowchart-crossStart" class="marker cross flowchart" viewBox="0 0 11 11" refX="-1" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"></path></marker><g class="root"><g class="clusters"><g class="cluster default" id="neetoApp"><rect style="" rx="0" ry="0" x="365.48828125" y="8" width="742.46875" height="259.37955474853516"></rect><g class="cluster-label" transform="translate(702.52734375, 13)"><foreignObject width="68.390625" height="25"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">neetoApp</span></div></foreignObject></g></g><g class="cluster default" id="neetoAuth"><rect style="" rx="0" ry="0" x="8" y="148" width="337.48828125" height="288.7591094970703"></rect><g class="cluster-label" transform="translate(139.548828125, 153)"><foreignObject width="74.390625" height="25"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">neetoAuth</span></div></foreignObject></g></g></g><g class="edgePaths"><path d="M116.36424514927424,227.68977737426758L110.84520429106186,234.30474026997885C105.3261634328495,240.9197031656901,94.28808171642474,254.14962895711264,88.76904085821236,267.0145918528239C83.25,279.87955474853516,83.25,292.37955474853516,83.25,304.87955474853516C83.25,317.37955474853516,83.25,329.87955474853516,83.25,336.12955474853516L83.25,342.37955474853516" id="L-neeto_auth_server-neeto_auth_database-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-neeto_auth_server LE-neeto_auth_database" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M159.25396995001802,227.68977737426758L167.920626000015,234.30474026997885C176.58728205001202,240.9197031656901,193.920594150006,254.14962895711264,202.587250200003,267.0145918528239C211.25390625,279.87955474853516,211.25390625,292.37955474853516,215.76576973484637,307.32785097757977C220.27763321969272,322.27614720662433,229.30136018938546,339.67273966471356,233.81322367423184,348.3710358937581L238.3250871590782,357.06933212280273" id="L-neeto_auth_server-neeto_auth_worker-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-neeto_auth_server LE-neeto_auth_worker" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M711.96484375,60.787121044478866L666.1796875,69.07260087039906C620.39453125,77.35808069631925,528.82421875,93.92904034815962,483.0390625,108.46452017407982C437.25390625,123,437.25390625,135.5,391.4869791666667,150.73024202975728C345.7200520833333,165.96048405951453,254.18619791666666,183.92096811902908,208.41927083333334,192.90121014878636L162.65234375,201.8814521785436" id="L-neeto_sso_app-neeto_auth_server-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-neeto_sso_app LE-neeto_auth_server" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M711.96484375,67.55000689116552L690.7942708333334,74.70833907597127C669.6236979166666,81.86667126077701,627.2825520833334,96.18333563038851,606.1119791666666,109.59166781519427C584.94140625,123,584.94140625,135.5,514.5598958333334,151.04662280122656C444.1783854166667,166.59324560245315,303.4153645833333,185.18649120490628,233.03385416666666,194.48311400613287L162.65234375,203.77973680735946" id="L-neeto_sso_app-neeto_auth_server-1" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-neeto_sso_app LE-neeto_auth_server" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M162.65234375,204.84883518844563L261.3763020833333,195.3740293237047C360.1002604166667,185.89922345896375,557.5481770833334,166.94961172948186,656.2721354166666,151.22480586474094C754.99609375,135.5,754.99609375,123,754.99609375,110.5C754.99609375,98,754.99609375,85.5,754.99609375,79.25L754.99609375,73" id="L-neeto_auth_server-neeto_sso_app-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-neeto_auth_server LE-neeto_sso_app" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M259.59930777396875,357.06933212280273L264.33991793664063,348.3710358937581C269.0805280993125,339.67273966471356,278.5617484246563,322.27614720662433,407.9937648373281,307.32785097757977C537.42578125,292.37955474853516,786.80859375,279.87955474853516,911.5,263.68125851949054C1036.19140625,247.48296229044595,1036.19140625,227.58636983235678,1036.19140625,207.68977737426758C1036.19140625,187.79318491617838,1036.19140625,167.8965924580892,1036.19140625,151.6982962290446C1036.19140625,135.5,1036.19140625,123,996.4973958333334,108.63320182628104C956.8033854166666,94.26640365256208,877.4153645833334,78.03280730512414,837.7213541666666,69.91600913140518L798.02734375,61.79921095768621" id="L-neeto_auth_worker-neeto_sso_app-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-neeto_auth_worker LE-neeto_sso_app" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M798.02734375,69.04813782619712L816.5520833333334,75.95678152183093C835.0768229166666,82.86542521746475,872.1263020833334,96.68271260873239,890.6510416666666,109.84135630436619C909.17578125,123,909.17578125,135.5,909.17578125,145.91666666666666C909.17578125,156.33333333333334,909.17578125,164.66666666666666,909.17578125,168.83333333333334L909.17578125,173" id="L-neeto_sso_app-neeto_app_database-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-neeto_sso_app LE-neeto_app_database" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path></g><g class="edgeLabels"><g class="edgeLabel" transform="translate(83.25, 304.87955474853516)"><g class="label" transform="translate(-29.078125, -12.5)"><foreignObject width="58.15625" height="25"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="edgeLabel">Updates</span></div></foreignObject></g></g><g class="edgeLabel" transform="translate(211.25390625, 304.87955474853516)"><g class="label" transform="translate(-56.7890625, -12.5)"><foreignObject width="113.578125" height="25"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="edgeLabel">Queues updates</span></div></foreignObject></g></g><g class="edgeLabel" transform="translate(437.25390625, 110.5)"><g class="label" transform="translate(-51.765625, -12.5)"><foreignObject width="103.53125" height="25"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="edgeLabel">Sends Updates</span></div></foreignObject></g></g><g class="edgeLabel" transform="translate(584.94140625, 110.5)"><g class="label" transform="translate(-75.921875, -12.5)"><foreignObject width="151.84375" height="25"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="edgeLabel">Requests information</span></div></foreignObject></g></g><g class="edgeLabel" transform="translate(754.99609375, 110.5)"><g class="label" transform="translate(-74.1328125, -12.5)"><foreignObject width="148.265625" height="25"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="edgeLabel">Provides information</span></div></foreignObject></g></g><g class="edgeLabel" transform="translate(1036.19140625, 207.68977737426758)"><g class="label" transform="translate(-51.765625, -12.5)"><foreignObject width="103.53125" height="25"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="edgeLabel">Sends Updates</span></div></foreignObject></g></g><g class="edgeLabel" transform="translate(909.17578125, 110.5)"><g class="label" transform="translate(-60.046875, -12.5)"><foreignObject width="120.09375" height="25"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="edgeLabel">Performs Update</span></div></foreignObject></g></g></g><g class="nodes"><g class="node default default" id="flowchart-neeto_sso_app-26" transform="translate(754.99609375, 53)"><rect class="basic label-container" style="" rx="0" ry="0" x="-43.03125" y="-20" width="86.0625" height="40"></rect><g class="label" style="" transform="translate(-35.53125, -12.5)"><foreignObject width="71.0625" height="25"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">neeto_sso</span></div></foreignObject></g></g><g class="node default default" id="flowchart-neeto_app_database-27" label-offset-y="9.793187347931873" transform="translate(909.17578125, 207.68977737426758)"><path style="" d="M 0,9.793187347931873 a 40.25,9.793187347931873 0,0,0 80.5 0 a 40.25,9.793187347931873 0,0,0 -80.5 0 l 0,49.79318734793188 a 40.25,9.793187347931873 0,0,0 80.5 0 l 0,-49.79318734793188" transform="translate(-40.25,-34.689781021897815)"></path><g class="label" style="" transform="translate(-32.75, -12.5)"><foreignObject width="65.5" height="25"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">Database</span></div></foreignObject></g></g><g class="node default default" id="flowchart-neeto_auth_server-19" transform="translate(133.05078125, 207.68977737426758)"><rect class="basic label-container" style="" rx="0" ry="0" x="-29.6015625" y="-20" width="59.203125" height="40"></rect><g class="label" style="" transform="translate(-22.1015625, -12.5)"><foreignObject width="44.203125" height="25"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">server</span></div></foreignObject></g></g><g class="node default default" id="flowchart-neeto_auth_database-20" label-offset-y="9.793187347931873" transform="translate(83.25, 377.06933212280273)"><path style="" d="M 0,9.793187347931873 a 40.25,9.793187347931873 0,0,0 80.5 0 a 40.25,9.793187347931873 0,0,0 -80.5 0 l 0,49.79318734793188 a 40.25,9.793187347931873 0,0,0 80.5 0 l 0,-49.79318734793188" transform="translate(-40.25,-34.689781021897815)"></path><g class="label" style="" transform="translate(-32.75, -12.5)"><foreignObject width="65.5" height="25"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">Database</span></div></foreignObject></g></g><g class="node default default" id="flowchart-neeto_auth_worker-21" transform="translate(248.69921875, 377.06933212280273)"><rect class="basic label-container" style="" rx="0" ry="0" x="-59.890625" y="-20" width="119.78125" height="40"></rect><g class="label" style="" transform="translate(-52.390625, -12.5)"><foreignObject width="104.78125" height="25"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">sidekiq worker</span></div></foreignObject></g></g></g></g></g></svg></div>
</div>
<script>
// config mermaid init call
// http://knsv.github.io/mermaid/#configuration
//
// You can edit the 'MERMAID_CONFIG' variable below.
MERMAID_CONFIG = {
startOnLoad: false
}
if (window['MERMAID_CONFIG']) {
window['MERMAID_CONFIG'].startOnLoad = false
window['MERMAID_CONFIG'].cloneCssStyles = false
window['MERMAID_CONFIG'].theme = "default"
}
mermaid.initialize(window['MERMAID_CONFIG'] || {})
if (typeof(window['Reveal']) !== 'undefined') {
function mermaidRevealHelper(event) {
var currentSlide = event.currentSlide
var diagrams = currentSlide.querySelectorAll('.mermaid')
for (var i = 0; i < diagrams.length; i++) {
var diagram = diagrams[i]
if (!diagram.hasAttribute('data-processed')) {
mermaid.init(null, diagram, ()=> {
Reveal.slide(event.indexh, event.indexv)
})
}
}
}
Reveal.addEventListener('slidechanged', mermaidRevealHelper)
Reveal.addEventListener('ready', mermaidRevealHelper)
} else {
mermaid.init(null, document.getElementsByClassName('mermaid'))
}
</script><div class="mermaidTooltip" style="opacity: 0;"></div>
</body></html>