Skip to content

Commit e10ba9e

Browse files
maxxiefjvc00kiemon5ter
authored andcommitted
Update authz_state.py
1 parent 3658fdc commit e10ba9e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/pyop/authz_state.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,25 +59,25 @@ def __init__(self, subject_identifier_factory, authorization_code_db=None, acces
5959
"""
6060
Mapping of authorization codes to the subject identifier and auth request.
6161
"""
62-
self.authorization_codes = authorization_code_db or {}
62+
self.authorization_codes = authorization_code_db if authorization_code_db is not None else {}
6363

6464
self.access_token_lifetime = access_token_lifetime
6565
"""
6666
Mapping of access tokens to the scope, token type, client id and subject identifier.
6767
"""
68-
self.access_tokens = access_token_db or {}
68+
self.access_tokens = access_token_db if access_token_db is not None else {}
6969

7070
self.refresh_token_lifetime = refresh_token_lifetime
7171
self.refresh_token_threshold = refresh_token_threshold
7272
"""
7373
Mapping of refresh tokens to access tokens.
7474
"""
75-
self.refresh_tokens = refresh_token_db or {}
75+
self.refresh_tokens = refresh_token_db if refresh_token_db is not None else {}
7676

7777
"""
7878
Mapping of user id's to subject identifiers.
7979
"""
80-
self.subject_identifiers = subject_identifier_db or {}
80+
self.subject_identifiers = subject_identifier_db if subject_identifier_db is not None else {}
8181

8282
def create_authorization_code(self, authorization_request, subject_identifier, scope=None):
8383
# type: (oic.oic.message.AuthorizationRequest, str, Optional[List[str]]) -> str

0 commit comments

Comments
 (0)