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

Commit 7eadfd4

Browse files
committed
Client auth method is handled per endpoint.
Central handling in endpoint.py .
1 parent ce96741 commit 7eadfd4

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

src/oidcendpoint/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
except ImportError:
77
import random as rnd
88

9-
__version__ = "0.13.0"
9+
__version__ = "0.13.1"
1010

1111

1212
DEF_SIGN_ALG = {

src/oidcendpoint/endpoint.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,11 @@ def __init__(self, endpoint_context, **kwargs):
178178
setattr(self, param, _val)
179179

180180
_methods = kwargs.get("client_authn_method")
181+
self.client_authn_method = []
181182
if _methods:
182183
self.client_authn_method = client_auth_setup(_methods, endpoint_context)
184+
elif _methods is not None: # [] or '' or something not None but regarded as nothing.
185+
pass # Ignore default value
183186
elif self.default_capabilities:
184187
_methods = self.default_capabilities.get("client_authn_method")
185188
if _methods:

src/oidcendpoint/endpoint_context.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,6 @@ def do_endpoints(self):
332332
self.endpoint = build_endpoints(
333333
self.conf["endpoint"],
334334
endpoint_context=self,
335-
client_authn_method=CLIENT_AUTHN_METHOD,
336335
issuer=self.conf["issuer"],
337336
)
338337

src/oidcendpoint/oidc/userinfo.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ class UserInfo(Endpoint):
3434
def __init__(self, endpoint_context, **kwargs):
3535
Endpoint.__init__(self, endpoint_context, **kwargs)
3636
self.scope_to_claims = None
37-
if "client_authn_method" not in kwargs:
38-
self.client_authn_method = self.default_capabilities["client_authn_method"]
3937
# Add the issuer ID as an allowed JWT target
4038
self.allowed_targets.append("")
4139

src/oidcendpoint/util.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def importer(name):
2828
return getattr(module, c2)
2929

3030

31-
def build_endpoints(conf, endpoint_context, client_authn_method, issuer):
31+
def build_endpoints(conf, endpoint_context, issuer):
3232
"""
3333
conf typically contains::
3434
@@ -40,7 +40,6 @@ def build_endpoints(conf, endpoint_context, client_authn_method, issuer):
4040
4141
:param conf:
4242
:param endpoint_context:
43-
:param client_authn_method:
4443
:param issuer:
4544
:return:
4645
"""

0 commit comments

Comments
 (0)