Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 464033b

Browse files
committed
Refactored.
1 parent 6dffa5f commit 464033b

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/oidcmsg/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
__version__ = '0.6.4'
33

44

5+
VERIFIED_CLAIM_PREFIX = '__verified'
6+
7+
8+
def verified_claim_name(claim):
9+
return '{}_{}'.format(VERIFIED_CLAIM_PREFIX, claim)
10+
11+
512
def proper_path(path):
613
"""
714
Clean up the path specification so it looks like something I could use.

src/oidcmsg/oidc/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
from oidcmsg import oauth2
1717
from oidcmsg import time_util
18+
from oidcmsg import verified_claim_name
1819
from oidcmsg.exception import FormatError
1920
from oidcmsg.exception import InvalidRequest
2021
from oidcmsg.exception import IssuerMismatch
@@ -243,11 +244,6 @@ def check_char_set(string, allowed):
243244
'allow_sign_alg_none']
244245

245246
CLAIMS_WITH_VERIFIED = ['id_token', 'id_token_hint', 'request']
246-
VERIFIED_CLAIM_PREFIX = '__verified'
247-
248-
249-
def verified_claim_name(claim):
250-
return '{}_{}'.format(VERIFIED_CLAIM_PREFIX, claim)
251247

252248

253249
def clear_verified_claims(msg):

0 commit comments

Comments
 (0)