This commit is contained in:
@@ -1284,9 +1284,8 @@
|
||||
|
||||
<div class="doc doc-contents first">
|
||||
|
||||
<p>Authentication provider contracts for Mail Intake.</p>
|
||||
<hr />
|
||||
<h4 id="mail_intake.auth.base--summary">Summary</h4>
|
||||
<h3 id="mail_intake.auth.base--summary">Summary</h3>
|
||||
<p>Authentication provider contracts for Mail Intake.</p>
|
||||
<p>This module defines the <strong>authentication abstraction layer</strong> used by mail
|
||||
adapters to obtain provider-specific credentials.</p>
|
||||
<p>Authentication concerns are intentionally decoupled from adapter logic.
|
||||
@@ -1332,15 +1331,19 @@ declare the type of credentials they return.</p>
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
|
||||
<span class="normal">2</span>
|
||||
<span class="normal">3</span>
|
||||
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><code>- Acquire credentials from an external provider
|
||||
- Refresh or revalidate credentials as needed
|
||||
- Handle authentication-specific failure modes
|
||||
- Coordinate with credential persistence layers where applicable
|
||||
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><code>- Acquire credentials from an external provider.
|
||||
- Refresh or revalidate credentials as needed.
|
||||
- Handle authentication-specific failure modes.
|
||||
- Coordinate with credential persistence layers where applicable.
|
||||
</code></pre></div></td></tr></table></div>
|
||||
<p><strong>Constraints:</strong></p>
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
|
||||
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><code>- Mail adapters must treat returned credentials as opaque and provider-specific
|
||||
- Mail adapters rely only on the declared credential type expected by the adapter
|
||||
<span class="normal">2</span>
|
||||
<span class="normal">3</span>
|
||||
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><code>- Mail adapters must treat returned credentials as opaque and
|
||||
provider-specific.
|
||||
- Mail adapters rely only on the declared credential type expected
|
||||
by the adapter.
|
||||
</code></pre></div></td></tr></table></div>
|
||||
</details>
|
||||
|
||||
@@ -1429,9 +1432,13 @@ credentials could not be obtained or validated.</p>
|
||||
<p><strong>Guarantees:</strong></p>
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
|
||||
<span class="normal">2</span>
|
||||
<span class="normal">3</span></pre></div></td><td class="code"><div><pre><span></span><code>- This method is synchronous by design
|
||||
- Represents the sole entry point through which adapters obtain authentication material
|
||||
- Implementations must either return credentials of the declared type ``T`` that are valid at the time of return or raise an exception
|
||||
<span class="normal">3</span>
|
||||
<span class="normal">4</span>
|
||||
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><code>- This method is synchronous by design.
|
||||
- Represents the sole entry point through which adapters obtain
|
||||
authentication material.
|
||||
- Implementations must either return credentials of the declared
|
||||
type `T` that are valid at the time of return or raise an exception.
|
||||
</code></pre></div></td></tr></table></div>
|
||||
</details>
|
||||
</div>
|
||||
|
||||
@@ -1284,16 +1284,17 @@
|
||||
|
||||
<div class="doc doc-contents first">
|
||||
|
||||
<p>Google authentication provider implementation for Mail Intake.</p>
|
||||
<hr />
|
||||
<h4 id="mail_intake.auth.google--summary">Summary</h4>
|
||||
<h3 id="mail_intake.auth.google--summary">Summary</h3>
|
||||
<p>Google authentication provider implementation for Mail Intake.</p>
|
||||
<p>This module provides a <strong>Google OAuth–based authentication provider</strong>
|
||||
used primarily for Gmail access.</p>
|
||||
<p>It encapsulates all Google-specific authentication concerns, including:
|
||||
- Credential loading and persistence
|
||||
- Token refresh handling
|
||||
- Interactive OAuth flow initiation
|
||||
- Coordination with a credential persistence layer</p>
|
||||
<p>It encapsulates all Google-specific authentication concerns, including:</p>
|
||||
<ul>
|
||||
<li>Credential loading and persistence.</li>
|
||||
<li>Token refresh handling.</li>
|
||||
<li>Interactive OAuth flow initiation.</li>
|
||||
<li>Coordination with a credential persistence layer.</li>
|
||||
</ul>
|
||||
<p>No Google authentication details should leak outside this module.</p>
|
||||
|
||||
|
||||
@@ -1321,7 +1322,7 @@ used primarily for Gmail access.</p>
|
||||
|
||||
<div class="doc doc-contents ">
|
||||
<p class="doc doc-class-bases">
|
||||
Bases: <code><a class="autorefs autorefs-internal" title="mail_intake.auth.base.MailIntakeAuthProvider" href="../../mail_intake/auth/base/#mail_intake.auth.base.MailIntakeAuthProvider">MailIntakeAuthProvider</a></code></p>
|
||||
Bases: <code><a class="autorefs autorefs-internal" title="mail_intake.auth.base.MailIntakeAuthProvider" href="../base/#mail_intake.auth.base.MailIntakeAuthProvider">MailIntakeAuthProvider</a></code></p>
|
||||
|
||||
|
||||
<p>Google OAuth provider for Gmail access.</p>
|
||||
@@ -1335,13 +1336,15 @@ Google's OAuth 2.0 flow and credential management libraries.</p>
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
|
||||
<span class="normal">2</span>
|
||||
<span class="normal">3</span>
|
||||
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><code>- Load cached credentials from a credential store when available
|
||||
- Refresh expired credentials when possible
|
||||
- Initiate an interactive OAuth flow only when required
|
||||
- Persist refreshed or newly obtained credentials via the store
|
||||
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><code>- Load cached credentials from a credential store when available.
|
||||
- Refresh expired credentials when possible.
|
||||
- Initiate an interactive OAuth flow only when required.
|
||||
- Persist refreshed or newly obtained credentials via the store.
|
||||
</code></pre></div></td></tr></table></div>
|
||||
<p><strong>Guarantees:</strong></p>
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><code>- This class is synchronous by design and maintains a minimal internal state
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
|
||||
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><code>- This class is synchronous by design and maintains a minimal
|
||||
internal state.
|
||||
</code></pre></div></td></tr></table></div>
|
||||
</details>
|
||||
<p>Initialize the Google authentication provider.</p>
|
||||
@@ -1375,7 +1378,7 @@ Google's OAuth 2.0 flow and credential management libraries.</p>
|
||||
<tr class="doc-section-item">
|
||||
<td><code>store</code></td>
|
||||
<td>
|
||||
<code><a class="autorefs autorefs-internal" title="mail_intake.credentials.store.CredentialStore" href="../../mail_intake/credentials/store/#mail_intake.credentials.store.CredentialStore">CredentialStore</a>[<span title="google.oauth2.credentials.Credentials">Credentials</span>]</code>
|
||||
<code><a class="autorefs autorefs-internal" title="mail_intake.credentials.store.CredentialStore" href="../../credentials/store/#mail_intake.credentials.store.CredentialStore">CredentialStore</a>[<span title="google.oauth2.credentials.Credentials">Credentials</span>]</code>
|
||||
</td>
|
||||
<td>
|
||||
<div class="doc-md-description">
|
||||
@@ -1467,7 +1470,7 @@ for use with Google API clients.</p>
|
||||
<tbody>
|
||||
<tr class="doc-section-item">
|
||||
<td>
|
||||
<code><a class="autorefs autorefs-internal" title="mail_intake.exceptions.MailIntakeAuthError" href="../../mail_intake/exceptions/#mail_intake.exceptions.MailIntakeAuthError">MailIntakeAuthError</a></code>
|
||||
<code><a class="autorefs autorefs-internal" title="mail_intake.exceptions.MailIntakeAuthError" href="../../exceptions/#mail_intake.exceptions.MailIntakeAuthError">MailIntakeAuthError</a></code>
|
||||
</td>
|
||||
<td>
|
||||
<div class="doc-md-description">
|
||||
@@ -1486,10 +1489,10 @@ or obtained via interactive authentication.</p>
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
|
||||
<span class="normal">2</span>
|
||||
<span class="normal">3</span>
|
||||
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><code>- Load cached credentials from the configured credential store
|
||||
- Refresh expired credentials when possible
|
||||
- Perform an interactive OAuth login as a fallback
|
||||
- Persist valid credentials for future use
|
||||
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><code>- Load cached credentials from the configured credential store.
|
||||
- Refresh expired credentials when possible.
|
||||
- Perform an interactive OAuth login as a fallback.
|
||||
- Persist valid credentials for future use.
|
||||
</code></pre></div></td></tr></table></div>
|
||||
</details>
|
||||
</div>
|
||||
|
||||
@@ -1212,26 +1212,29 @@
|
||||
|
||||
<div class="doc doc-contents first">
|
||||
|
||||
<p>Authentication provider implementations for Mail Intake.</p>
|
||||
<hr />
|
||||
<h4 id="mail_intake.auth--summary">Summary</h4>
|
||||
<h3 id="mail_intake.auth--summary">Summary</h3>
|
||||
<p>Authentication provider implementations for Mail Intake.</p>
|
||||
<p>This package defines the <strong>authentication layer</strong> used by mail adapters
|
||||
to obtain provider-specific credentials.</p>
|
||||
<p>It exposes:
|
||||
- A stable, provider-agnostic authentication contract
|
||||
- Concrete authentication providers for supported platforms</p>
|
||||
<p>Authentication providers:
|
||||
- Are responsible for credential acquisition and lifecycle management
|
||||
- Are intentionally decoupled from adapter logic
|
||||
- May be extended by users to support additional providers</p>
|
||||
<p>It exposes:</p>
|
||||
<ul>
|
||||
<li>A stable, provider-agnostic authentication contract.</li>
|
||||
<li>Concrete authentication providers for supported platforms.</li>
|
||||
</ul>
|
||||
<p>Authentication providers:</p>
|
||||
<ul>
|
||||
<li>Are responsible for credential acquisition and lifecycle management.</li>
|
||||
<li>Are intentionally decoupled from adapter logic.</li>
|
||||
<li>May be extended by users to support additional providers.</li>
|
||||
</ul>
|
||||
<p>Consumers should depend on the abstract interface and use concrete
|
||||
implementations only where explicitly required.</p>
|
||||
<hr />
|
||||
<h4 id="mail_intake.auth--public-api">Public API</h4>
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
|
||||
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><code>MailIntakeAuthProvider
|
||||
MailIntakeGoogleAuth
|
||||
</code></pre></div></td></tr></table></div>
|
||||
<h3 id="mail_intake.auth--public-api">Public API</h3>
|
||||
<ul>
|
||||
<li><code>MailIntakeAuthProvider</code></li>
|
||||
<li><code>MailIntakeGoogleAuth</code></li>
|
||||
</ul>
|
||||
<hr />
|
||||
|
||||
|
||||
@@ -1273,15 +1276,19 @@ declare the type of credentials they return.</p>
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
|
||||
<span class="normal">2</span>
|
||||
<span class="normal">3</span>
|
||||
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><code>- Acquire credentials from an external provider
|
||||
- Refresh or revalidate credentials as needed
|
||||
- Handle authentication-specific failure modes
|
||||
- Coordinate with credential persistence layers where applicable
|
||||
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><code>- Acquire credentials from an external provider.
|
||||
- Refresh or revalidate credentials as needed.
|
||||
- Handle authentication-specific failure modes.
|
||||
- Coordinate with credential persistence layers where applicable.
|
||||
</code></pre></div></td></tr></table></div>
|
||||
<p><strong>Constraints:</strong></p>
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
|
||||
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><code>- Mail adapters must treat returned credentials as opaque and provider-specific
|
||||
- Mail adapters rely only on the declared credential type expected by the adapter
|
||||
<span class="normal">2</span>
|
||||
<span class="normal">3</span>
|
||||
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><code>- Mail adapters must treat returned credentials as opaque and
|
||||
provider-specific.
|
||||
- Mail adapters rely only on the declared credential type expected
|
||||
by the adapter.
|
||||
</code></pre></div></td></tr></table></div>
|
||||
</details>
|
||||
|
||||
@@ -1370,9 +1377,13 @@ credentials could not be obtained or validated.</p>
|
||||
<p><strong>Guarantees:</strong></p>
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
|
||||
<span class="normal">2</span>
|
||||
<span class="normal">3</span></pre></div></td><td class="code"><div><pre><span></span><code>- This method is synchronous by design
|
||||
- Represents the sole entry point through which adapters obtain authentication material
|
||||
- Implementations must either return credentials of the declared type ``T`` that are valid at the time of return or raise an exception
|
||||
<span class="normal">3</span>
|
||||
<span class="normal">4</span>
|
||||
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><code>- This method is synchronous by design.
|
||||
- Represents the sole entry point through which adapters obtain
|
||||
authentication material.
|
||||
- Implementations must either return credentials of the declared
|
||||
type `T` that are valid at the time of return or raise an exception.
|
||||
</code></pre></div></td></tr></table></div>
|
||||
</details>
|
||||
</div>
|
||||
@@ -1401,7 +1412,7 @@ credentials could not be obtained or validated.</p>
|
||||
|
||||
<div class="doc doc-contents ">
|
||||
<p class="doc doc-class-bases">
|
||||
Bases: <code><a class="autorefs autorefs-internal" title="mail_intake.auth.base.MailIntakeAuthProvider" href="../mail_intake/auth/base/#mail_intake.auth.base.MailIntakeAuthProvider">MailIntakeAuthProvider</a></code></p>
|
||||
Bases: <code><a class="autorefs autorefs-internal" title="mail_intake.auth.base.MailIntakeAuthProvider" href="base/#mail_intake.auth.base.MailIntakeAuthProvider">MailIntakeAuthProvider</a></code></p>
|
||||
|
||||
|
||||
<p>Google OAuth provider for Gmail access.</p>
|
||||
@@ -1415,13 +1426,15 @@ Google's OAuth 2.0 flow and credential management libraries.</p>
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
|
||||
<span class="normal">2</span>
|
||||
<span class="normal">3</span>
|
||||
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><code>- Load cached credentials from a credential store when available
|
||||
- Refresh expired credentials when possible
|
||||
- Initiate an interactive OAuth flow only when required
|
||||
- Persist refreshed or newly obtained credentials via the store
|
||||
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><code>- Load cached credentials from a credential store when available.
|
||||
- Refresh expired credentials when possible.
|
||||
- Initiate an interactive OAuth flow only when required.
|
||||
- Persist refreshed or newly obtained credentials via the store.
|
||||
</code></pre></div></td></tr></table></div>
|
||||
<p><strong>Guarantees:</strong></p>
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><code>- This class is synchronous by design and maintains a minimal internal state
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
|
||||
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><code>- This class is synchronous by design and maintains a minimal
|
||||
internal state.
|
||||
</code></pre></div></td></tr></table></div>
|
||||
</details>
|
||||
<p>Initialize the Google authentication provider.</p>
|
||||
@@ -1455,7 +1468,7 @@ Google's OAuth 2.0 flow and credential management libraries.</p>
|
||||
<tr class="doc-section-item">
|
||||
<td><code>store</code></td>
|
||||
<td>
|
||||
<code><a class="autorefs autorefs-internal" title="mail_intake.credentials.store.CredentialStore" href="../mail_intake/credentials/store/#mail_intake.credentials.store.CredentialStore">CredentialStore</a>[<span title="google.oauth2.credentials.Credentials">Credentials</span>]</code>
|
||||
<code><a class="autorefs autorefs-internal" title="mail_intake.credentials.store.CredentialStore" href="../credentials/store/#mail_intake.credentials.store.CredentialStore">CredentialStore</a>[<span title="google.oauth2.credentials.Credentials">Credentials</span>]</code>
|
||||
</td>
|
||||
<td>
|
||||
<div class="doc-md-description">
|
||||
@@ -1547,7 +1560,7 @@ for use with Google API clients.</p>
|
||||
<tbody>
|
||||
<tr class="doc-section-item">
|
||||
<td>
|
||||
<code><a class="autorefs autorefs-internal" title="mail_intake.exceptions.MailIntakeAuthError" href="../mail_intake/exceptions/#mail_intake.exceptions.MailIntakeAuthError">MailIntakeAuthError</a></code>
|
||||
<code><a class="autorefs autorefs-internal" title="mail_intake.exceptions.MailIntakeAuthError" href="../exceptions/#mail_intake.exceptions.MailIntakeAuthError">MailIntakeAuthError</a></code>
|
||||
</td>
|
||||
<td>
|
||||
<div class="doc-md-description">
|
||||
@@ -1566,10 +1579,10 @@ or obtained via interactive authentication.</p>
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
|
||||
<span class="normal">2</span>
|
||||
<span class="normal">3</span>
|
||||
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><code>- Load cached credentials from the configured credential store
|
||||
- Refresh expired credentials when possible
|
||||
- Perform an interactive OAuth login as a fallback
|
||||
- Persist valid credentials for future use
|
||||
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><code>- Load cached credentials from the configured credential store.
|
||||
- Refresh expired credentials when possible.
|
||||
- Perform an interactive OAuth login as a fallback.
|
||||
- Persist valid credentials for future use.
|
||||
</code></pre></div></td></tr></table></div>
|
||||
</details>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user