Skip to content

Commit 72b0a80

Browse files
committed
GH-9: Finish up the implementation of BaseUser properties
1 parent 1241140 commit 72b0a80

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/fastapi_oauth2/middleware.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ def jwt_create(cls, token_data: dict) -> str:
7070

7171
class User(BaseUser, dict):
7272
def __init__(self, seq: Optional[dict] = None, **kwargs) -> None:
73-
self._is_authenticated = seq is not None
74-
self._display_name = ""
75-
self._identity = ""
7673
super().__init__(seq or {}, **kwargs)
74+
self._is_authenticated = seq is not None
75+
self._identity = self.get("identity", "")
76+
self._display_name = self.get("display_name", "")
7777

7878
@property
7979
def is_authenticated(self) -> bool:

0 commit comments

Comments
 (0)