File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
examples/mock_oidc_server Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 3939# Configuration
4040ISSUER = os .environ .get ("ISSUER" , "http://localhost:3000" )
4141AVAILABLE_SCOPES = os .environ .get ("SCOPES" , "" )
42- KEY_ID = "1"
4342
4443
4544@dataclass
4645class KeyPair :
4746 cache_dir : Path
47+ key_id : str = "1"
4848
4949 jwks : dict = field (init = False )
5050 private_key : str = field (init = False )
@@ -73,7 +73,7 @@ def __post_init__(self):
7373 {
7474 "kty" : "RSA" ,
7575 "use" : "sig" ,
76- "kid" : KEY_ID ,
76+ "kid" : self . key_id ,
7777 "alg" : "RS256" ,
7878 "n" : int_to_base64url (public_numbers .n ),
7979 "e" : int_to_base64url (public_numbers .e ),
@@ -274,11 +274,11 @@ async def token(
274274 "iat" : now ,
275275 "exp" : now + expires_delta ,
276276 "scope" : auth_details ["scope" ],
277- "kid" : KEY_ID ,
277+ "kid" : KEY_PAIR . key_id ,
278278 },
279279 KEY_PAIR .private_key ,
280280 algorithm = "RS256" ,
281- headers = {"kid" : KEY_ID },
281+ headers = {"kid" : KEY_PAIR . key_id },
282282 ),
283283 "token_type" : "Bearer" ,
284284 "expires_in" : expires_delta .seconds ,
Original file line number Diff line number Diff line change 9999 < h1 > Fake Login</ h1 >
100100 < div class ="mock-notice ">
101101 < strong > ⚠️ This is a mock authentication server.</ strong >
102- This is a development/testing server that will automatically generate a
103- token for a mock user (< code > user123</ code > ) when you click continue.
102+ This is a development/testing server that will authenticate you as a mock user.
104103 </ div >
105104 < p class ="info ">
106105 Application < strong > {{ client_id }}</ strong > is requesting access to
You can’t perform that action at this time.
0 commit comments