Skip to content

Commit

Permalink
Deployed ca44653 with MkDocs version: 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
m4ra committed Sep 3, 2024
1 parent c1b484f commit 8bd8871
Show file tree
Hide file tree
Showing 20 changed files with 229 additions and 5 deletions.
2 changes: 2 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
</ul>
<p class="caption"><span class="caption-text">Explanations</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="/authentication/">authentication</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="/celery/">celery</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="/ckeditor/">ckeditor</a>
Expand Down
6 changes: 4 additions & 2 deletions api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@
</ul>
<p class="caption"><span class="caption-text">Explanations</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../authentication/">authentication</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../celery/">celery</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../ckeditor/">ckeditor</a>
Expand Down Expand Up @@ -841,7 +843,7 @@ <h2 id="idea-api">Idea API</h2>
</div><footer>
<div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
<a href="../diagrams_modules/" class="btn btn-neutral float-left" title="participation modules"><span class="icon icon-circle-arrow-left"></span> Previous</a>
<a href="../celery/" class="btn btn-neutral float-right" title="celery">Next <span class="icon icon-circle-arrow-right"></span></a>
<a href="../authentication/" class="btn btn-neutral float-right" title="authentication">Next <span class="icon icon-circle-arrow-right"></span></a>
</div>

<hr/>
Expand All @@ -867,7 +869,7 @@ <h2 id="idea-api">Idea API</h2>
<span><a href="../diagrams_modules/" style="color: #fcfcfc">&laquo; Previous</a></span>


<span><a href="../celery/" style="color: #fcfcfc">Next &raquo;</a></span>
<span><a href="../authentication/" style="color: #fcfcfc">Next &raquo;</a></span>

</span>
</div>
Expand Down
188 changes: 188 additions & 0 deletions authentication/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="shortcut icon" href="../img/favicon.ico" />
<title>authentication - Adhocracy+</title>
<link rel="stylesheet" href="../css/theme.css" />
<link rel="stylesheet" href="../css/theme_extra.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github.min.css" />
<link href="../assets/_mkdocstrings.css" rel="stylesheet" />

<script>
// Current page data
var mkdocs_page_name = "authentication";
var mkdocs_page_input_path = "authentication.md";
var mkdocs_page_url = null;
</script>

<!--[if lt IE 9]>
<script src="../js/html5shiv.min.js"></script>
<![endif]-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
<script>hljs.highlightAll();</script>
</head>

<body class="wy-body-for-nav" role="document">

<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href=".." class="icon icon-home"> Adhocracy+
</a>
</div>

<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="..">Home</a>
</li>
</ul>
<p class="caption"><span class="caption-text">HOWTO</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../installation_dev/">install for development</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../django_shell_basics/">django basics</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../management_commands/">management commands</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../languages_and_translations/">translations</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../howtomkdocs/">create documentation</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../installation_prod/">install on production</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Diagrams</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../diagrams_modules/">participation modules</a>
</li>
</ul>
<p class="caption"><span class="caption-text">API</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../api/">code reference</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Explanations</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal current" href="#">authentication</a>
<ul class="current">
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../celery/">celery</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../ckeditor/">ckeditor</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../img_saving_and_deletion/">images</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../project_insights/">project insights</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../img_saving_and_deletion/">images</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../software_architecture/">architecture</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../tests/">tests</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Repository</span></p>
<ul>
<li class="toctree-l1"><a class="" href="https://github.com/liqd/adhocracy-plus">source code</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../contributing/">contribute</a>
</li>
</ul>
</div>
</div>
</nav>

<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="..">Adhocracy+</a>

</nav>
<div class="wy-nav-content">
<div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href=".." class="icon icon-home" aria-label="Docs"></a></li>
<li class="breadcrumb-item">Explanations</li>
<li class="breadcrumb-item active">authentication</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div class="section" itemprop="articleBody">

<h1 id="authentication">Authentication</h1>
<p>We use <a href="https://docs.allauth.org/">Django Allauth</a> for handling user registration, email and social logins via the browser.</p>
<p>For API authentication we setup Django Rest Framework with Simple JWT for authentication via JWT tokens. Existing users can obtain JWT tokens through the TokenObtainPairView. We haven't enabled JWT based registration yet, as this is an implementation for an external partner, and not as part of the software architecture exposing API registration with JWT.</p>
<p>Login: Users can obtain JWT tokens via the <code>/api/token/</code> endpoint.
For testing via the terminal try:</p>
<pre><code>curl -X POST -H &quot;Content-Type: application/json&quot; -d '{&quot;username&quot;: &quot;admin&quot;,&quot;password&quot;: &quot;password&quot;}' http://adhocracy.plus/api/token/

</code></pre>
<p>For testing in dev and stage servers replace the domain name with <code>http://aplus-dev.liqd.net/api/token/</code> and <code>http://aplus-stage.liqd.net/api/token/</code> respectively.
Make sure to use your corresponding user credentials (username, password).</p>
<p>The response of the above command, will include an access and a refresh token.</p>
<p>For accessing the projects list endpoint <code>/api/app-projects/</code>, user need to supply the obtained JWT token.
E.g testing via the terminal with:</p>
<pre><code>curl -H &quot;Authorization: Bearer &lt;access token from the response&gt;&quot; https://adhocracy.plus/api/app-projects/
</code></pre>
<p>For accessing a project details, we can lookup the <code>slug</code> key from the projects list, and call the endpoint <code>/api/app-projects/app-testing/</code>, where the slug is <code>app-testing</code>.
E.g for testing in the terminal, we can run:</p>
<pre><code>curl -H &quot;Authorization: Bearer &lt;access token from the response&gt;&quot; https://aplus-dev.liqd.net/api/app-projects/app-testing/
</code></pre>
<p>The expiration time for JWT access token is 5hrs, after which the user can refresh it by calling the <code>api/token/refresh/</code> with the <code>refresh</code> token obtained during login.
Refresh token expires after 1 day. They expiration times are set in the settings file <code>adhocracy-plus/config/settings/base.py</code> as <code>SIMPLE_JWT</code>.</p>
<p>For more info about how to obtain and refresh a token, visit the <a href="https://django-rest-framework-simplejwt.readthedocs.io/en/latest/getting_started.html#usage">django restframework simple jwt</a> docs.</p>

</div>
</div><footer>
<div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
<a href="../api/" class="btn btn-neutral float-left" title="code reference"><span class="icon icon-circle-arrow-left"></span> Previous</a>
<a href="../celery/" class="btn btn-neutral float-right" title="celery">Next <span class="icon icon-circle-arrow-right"></span></a>
</div>

<hr/>

<div role="contentinfo">
<!-- Copyright etc -->
</div>

Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>

</div>
</div>

</section>

</div>

<div class="rst-versions" role="note" aria-label="Versions">
<span class="rst-current-version" data-toggle="rst-current-version">


<span><a href="../api/" style="color: #fcfcfc">&laquo; Previous</a></span>


<span><a href="../celery/" style="color: #fcfcfc">Next &raquo;</a></span>

</span>
</div>
<script src="../js/jquery-3.6.0.min.js"></script>
<script>var base_url = "..";</script>
<script src="../js/theme_extra.js"></script>
<script src="../js/theme.js"></script>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>

</body>
</html>
6 changes: 4 additions & 2 deletions celery/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
</ul>
<p class="caption"><span class="caption-text">Explanations</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../authentication/">authentication</a>
</li>
<li class="toctree-l1 current"><a class="reference internal current" href="#">celery</a>
<ul class="current">
</ul>
Expand Down Expand Up @@ -155,7 +157,7 @@ <h3 id="makefile">makefile</h3>
</div>
</div><footer>
<div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
<a href="../api/" class="btn btn-neutral float-left" title="code reference"><span class="icon icon-circle-arrow-left"></span> Previous</a>
<a href="../authentication/" class="btn btn-neutral float-left" title="authentication"><span class="icon icon-circle-arrow-left"></span> Previous</a>
<a href="../ckeditor/" class="btn btn-neutral float-right" title="ckeditor">Next <span class="icon icon-circle-arrow-right"></span></a>
</div>

Expand All @@ -179,7 +181,7 @@ <h3 id="makefile">makefile</h3>
<span class="rst-current-version" data-toggle="rst-current-version">


<span><a href="../api/" style="color: #fcfcfc">&laquo; Previous</a></span>
<span><a href="../authentication/" style="color: #fcfcfc">&laquo; Previous</a></span>


<span><a href="../ckeditor/" style="color: #fcfcfc">Next &raquo;</a></span>
Expand Down
2 changes: 2 additions & 0 deletions ckeditor/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
</ul>
<p class="caption"><span class="caption-text">Explanations</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../authentication/">authentication</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../celery/">celery</a>
</li>
<li class="toctree-l1 current"><a class="reference internal current" href="#">ckeditor</a>
Expand Down
2 changes: 2 additions & 0 deletions contributing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
</ul>
<p class="caption"><span class="caption-text">Explanations</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../authentication/">authentication</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../celery/">celery</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../ckeditor/">ckeditor</a>
Expand Down
2 changes: 2 additions & 0 deletions diagrams_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
</ul>
<p class="caption"><span class="caption-text">Explanations</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../authentication/">authentication</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../celery/">celery</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../ckeditor/">ckeditor</a>
Expand Down
2 changes: 2 additions & 0 deletions django_shell_basics/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
</ul>
<p class="caption"><span class="caption-text">Explanations</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../authentication/">authentication</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../celery/">celery</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../ckeditor/">ckeditor</a>
Expand Down
2 changes: 2 additions & 0 deletions howtomkdocs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
</ul>
<p class="caption"><span class="caption-text">Explanations</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../authentication/">authentication</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../celery/">celery</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../ckeditor/">ckeditor</a>
Expand Down
2 changes: 2 additions & 0 deletions img_saving_and_deletion/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
</ul>
<p class="caption"><span class="caption-text">Explanations</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../authentication/">authentication</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../celery/">celery</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../ckeditor/">ckeditor</a>
Expand Down
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@
</ul>
<p class="caption"><span class="caption-text">Explanations</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="authentication/">authentication</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="celery/">celery</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="ckeditor/">ckeditor</a>
Expand Down Expand Up @@ -236,5 +238,5 @@ <h2 id="timelines_1"><a name="timelines">Timelines</a></h2>

<!--
MkDocs version : 1.6.0
Build Date UTC : 2024-08-28 13:11:12.750928+00:00
Build Date UTC : 2024-09-03 12:49:47.168622+00:00
-->
2 changes: 2 additions & 0 deletions installation_dev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
</ul>
<p class="caption"><span class="caption-text">Explanations</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../authentication/">authentication</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../celery/">celery</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../ckeditor/">ckeditor</a>
Expand Down
2 changes: 2 additions & 0 deletions installation_prod/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@
</ul>
<p class="caption"><span class="caption-text">Explanations</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../authentication/">authentication</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../celery/">celery</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../ckeditor/">ckeditor</a>
Expand Down
2 changes: 2 additions & 0 deletions languages_and_translations/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@
</ul>
<p class="caption"><span class="caption-text">Explanations</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../authentication/">authentication</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../celery/">celery</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../ckeditor/">ckeditor</a>
Expand Down
2 changes: 2 additions & 0 deletions management_commands/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
</ul>
<p class="caption"><span class="caption-text">Explanations</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../authentication/">authentication</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../celery/">celery</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../ckeditor/">ckeditor</a>
Expand Down
2 changes: 2 additions & 0 deletions project_insights/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
</ul>
<p class="caption"><span class="caption-text">Explanations</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../authentication/">authentication</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../celery/">celery</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../ckeditor/">ckeditor</a>
Expand Down
Loading

0 comments on commit 8bd8871

Please sign in to comment.