-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Refactored and simplified auth handlers (inbox/auth/*) - Supported providers are "custom", "gmail", "outlook", no more complex module registering logic. - Only one token per account (we're assuming the user doesn't have different tokens for email, calendar, contacts) - No longer using `GmailAuthCredentials` table. We only support one app token. However, for compatibility with old code, this table is still maintained. - By default, store the client ID on the account table to still allow migrating accounts from one client ID to another (This would require some minor work to feed multiple client secrets via config). - Keeping the account verification methods due to many tests using them, but we aren't using them so far. - API (inbox/api/srv.py) and auth handler now uses attr objects instead of a dict. Supports both token and AuthAlligator auth info. - Single entry point to obtain an access token via existing `TokenManager` which can use a refresh token or AuthAlligator (not implemented yet). - Email uses `get_authenticated_imap_connection` for convenience. - Events uses existing requests client with token from the token manager. - Contacts uses existing Google library but doesn't touch the refresh token since it uses `gdata.gauth.AuthSubToken` with the token from the token manager.
- Loading branch information
Showing
42 changed files
with
918 additions
and
2,363 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +0,0 @@ | ||
""" | ||
Per-provider auth modules. | ||
An auth module *must* meet the following requirement: | ||
1. Specify the provider it implements as the module-level PROVIDER variable. | ||
For example, 'gmail', 'imap', 'eas', 'yahoo' etc. | ||
2. Live in the 'auth/' directory. | ||
3. Register an AuthHandler class as an entry point in setup.py | ||
""" | ||
# Allow out-of-tree auth submodules. | ||
from pkgutil import extend_path | ||
|
||
from inbox.util.misc import register_backends | ||
|
||
__path__ = extend_path(__path__, __name__) | ||
module_registry = register_backends(__name__, __path__) | ||
Oops, something went wrong.