updated docs strings and added README.md
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
"""
|
||||
# Summary
|
||||
|
||||
Google authentication provider implementation for Mail Intake.
|
||||
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
This module provides a **Google OAuth–based authentication provider**
|
||||
used primarily for Gmail access.
|
||||
|
||||
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
|
||||
|
||||
- Credential loading and persistence.
|
||||
- Token refresh handling.
|
||||
- Interactive OAuth flow initiation.
|
||||
- Coordination with a credential persistence layer.
|
||||
|
||||
No Google authentication details should leak outside this module.
|
||||
"""
|
||||
@@ -40,14 +39,15 @@ class MailIntakeGoogleAuth(MailIntakeAuthProvider):
|
||||
Notes:
|
||||
**Responsibilities:**
|
||||
|
||||
- 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
|
||||
- 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.
|
||||
|
||||
**Guarantees:**
|
||||
|
||||
- This class is synchronous by design and maintains a minimal internal state
|
||||
- This class is synchronous by design and maintains a minimal
|
||||
internal state.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
@@ -79,7 +79,7 @@ class MailIntakeGoogleAuth(MailIntakeAuthProvider):
|
||||
|
||||
Returns:
|
||||
Credentials:
|
||||
A ``google.oauth2.credentials.Credentials`` instance suitable
|
||||
A `google.oauth2.credentials.Credentials` instance suitable
|
||||
for use with Google API clients.
|
||||
|
||||
Raises:
|
||||
@@ -90,10 +90,10 @@ class MailIntakeGoogleAuth(MailIntakeAuthProvider):
|
||||
Notes:
|
||||
**Lifecycle:**
|
||||
|
||||
- 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
|
||||
- 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.
|
||||
"""
|
||||
creds = self.store.load()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user