File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 5
5
6
6
import httpx
7
7
from oauthlib .oauth2 import WebApplicationClient
8
- from starlette .exceptions import HTTPException
9
8
from starlette .requests import Request
10
9
from starlette .responses import RedirectResponse
11
10
12
11
from .config import JWT_EXPIRES , OAUTH2_REDIRECT_URL
12
+ from .exceptions import OAuth2LoginError
13
13
from .utils import jwt_create
14
14
15
15
16
- class OAuth2LoginError (HTTPException ):
17
- """Raised when any login-related error occurs
18
- (such as when user is not verified or if there was an attempt for fake login)
19
- """
20
-
21
-
22
- class OAuth2Base :
16
+ class OAuth2Core :
23
17
"""Base class (mixin) for all SSO providers"""
24
18
25
19
client_id : str = None
Original file line number Diff line number Diff line change
1
+ from starlette .exceptions import HTTPException
2
+
3
+
4
+ class OAuth2LoginError (HTTPException ):
5
+ """Raised when any login-related error occurs
6
+ (such as when user is not verified or if there was an attempt for fake login)
7
+ """
You can’t perform that action at this time.
0 commit comments