mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 15:12:08 +01:00
feat(auth): add CustomOpenID class to force get_user_info implementation
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import secrets
|
||||
from typing import Optional, Literal
|
||||
|
||||
from httpx_oauth.clients.openid import OpenID
|
||||
from httpx_oauth.oauth2 import T
|
||||
|
||||
from app.oauth.custom_openid import CustomOpenID
|
||||
|
||||
class BankID(OpenID):
|
||||
|
||||
class BankID(CustomOpenID):
|
||||
def __init__(self, client_id: str, client_secret: str):
|
||||
super().__init__(
|
||||
client_id,
|
||||
|
||||
6
7project/backend/app/oauth/custom_openid.py
Normal file
6
7project/backend/app/oauth/custom_openid.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from httpx_oauth.clients.openid import OpenID
|
||||
|
||||
|
||||
class CustomOpenID(OpenID):
|
||||
async def get_user_info(self, token: str) -> dict:
|
||||
raise NotImplementedError()
|
||||
@@ -1,11 +1,12 @@
|
||||
import json
|
||||
from typing import Optional, Literal, Any
|
||||
|
||||
from httpx_oauth.clients.openid import OpenID
|
||||
from httpx_oauth.oauth2 import T
|
||||
|
||||
from app.oauth.custom_openid import CustomOpenID
|
||||
|
||||
class MojeIDOAuth(OpenID):
|
||||
|
||||
class MojeIDOAuth(CustomOpenID):
|
||||
def __init__(self, client_id: str, client_secret: str):
|
||||
super().__init__(
|
||||
client_id,
|
||||
|
||||
Reference in New Issue
Block a user