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

Commit 8df2b01

Browse files
committed
minor examples changes
1 parent f6f6fd9 commit 8df2b01

File tree

5 files changed

+16
-15
lines changed

5 files changed

+16
-15
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ __pycache__/
33
*.py[cod]
44
*$py.class
55

6+
.pytest_cache/
7+
68
# C extensions
79
*.so
810

.pytest_cache/v/cache/lastfailed

Lines changed: 0 additions & 6 deletions
This file was deleted.

flask_rp/application.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def init_oidc_rp_handler(app):
2727
client_configs=app.config.get('CLIENTS'),
2828
services=app.config.get('SERVICES'),
2929
verify_ssl=verify_ssl)
30-
3130
return rph
3231

3332

@@ -54,4 +53,4 @@ def oidc_provider_init_app(config_file, name=None, **kwargs):
5453
# Initialize the oidc_provider after views to be able to set correct urls
5554
app.rph = init_oidc_rp_handler(app)
5655

57-
return app
56+
return app

flask_rp/conf.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,14 @@ SESSION_COOKIE_NAME: 'rp_session'
2525
PREFERRED_URL_SCHEME: 'https'
2626

2727
OIDC_KEYS:
28-
'private_path': "./priv/jwks.json"
28+
'private_path': './private/jwks.json'
2929
'key_defs': *keydef
3030
'public_path': './static/jwks.json'
31+
# this will create the jwks files if they absent
32+
'read_only': False
3133

32-
PUBLIC_JWKS_PATH: 'https://127.0.0.1:8090/static/jwks.json'
34+
# PUBLIC_JWKS_PATH: 'https://127.0.0.1:8090/static/jwks.json'
35+
# PRIVATE_JWKS_PATH: './private/jwks.json'
3336

3437
client_preferences: &id001
3538
application_name: rphandler
@@ -67,6 +70,10 @@ CLIENTS:
6770
flop:
6871
client_preferences: *id001
6972
issuer: https://127.0.0.1:5000/
73+
# keys:
74+
# url:
75+
# 'https://127.0.0.1:5000' : https://127.0.0.1:5000/static/jwks.json
76+
jwks_uri: https://127.0.0.1:8090/static/jwks.json
7077
redirect_uris: ['https://127.0.0.1:8090/authz_cb/flop']
7178
services: *id002
7279

src/oidcrp/__init__.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ def init_client(self, issuer):
182182
:return: A Client instance
183183
"""
184184
_cnf = self.pick_config(issuer)
185-
186185
try:
187186
_services = _cnf['services']
188187
except KeyError:
@@ -210,8 +209,8 @@ def do_provider_info(self, client=None, state=''):
210209
discovery.
211210
212211
:param client: A Client instance
213-
:param state: A key by which the state of the session can be
214-
retrieved
212+
:param state: A key by which the state of the session can be
213+
retrieved
215214
:return: issuer ID
216215
"""
217216

@@ -248,8 +247,8 @@ def do_client_registration(self, client=None, iss_id='', state=''):
248247
Prepare for and do client registration if configured to do so
249248
250249
:param client: A Client instance
251-
:param state: A key by which the state of the session can be
252-
retrieved
250+
:param state: A key by which the state of the session can be
251+
retrieved
253252
"""
254253

255254
if not client:

0 commit comments

Comments
 (0)