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

Commit 4e2aa78

Browse files
committed
Added nsklikas test.
Bumped version
1 parent 008b3d7 commit 4e2aa78

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/oidcmsg/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__author__ = 'Roland Hedberg'
2-
__version__ = '1.1.3'
2+
__version__ = '1.1.4'
33

44
import os
55

src/oidcmsg/oidc/__init__.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
from oidcmsg.exception import OidcMsgError
2828
from oidcmsg.exception import SchemeError
2929
from oidcmsg.exception import VerificationError
30+
from oidcmsg.message import Message
3031
from oidcmsg.message import OPTIONAL_LIST_OF_SP_SEP_STRINGS
3132
from oidcmsg.message import OPTIONAL_LIST_OF_STRINGS
3233
from oidcmsg.message import OPTIONAL_MESSAGE
@@ -36,7 +37,6 @@
3637
from oidcmsg.message import SINGLE_OPTIONAL_JSON
3738
from oidcmsg.message import SINGLE_OPTIONAL_STRING
3839
from oidcmsg.message import SINGLE_REQUIRED_STRING
39-
from oidcmsg.message import Message
4040
from oidcmsg.message import msg_ser
4141
from oidcmsg.oauth2 import ResponseMessage
4242
from oidcmsg.time_util import utc_time_sans_frac
@@ -930,6 +930,14 @@ def verify(self, **kwargs):
930930
elif parts.scheme != "https":
931931
raise SchemeError("Not HTTPS")
932932

933+
# The parameter is optional
934+
if "token_endpoint_auth_signing_alg_values_supported" in self and "none" in self[
935+
"token_endpoint_auth_signing_alg_values_supported"]:
936+
raise ValueError(
937+
"The value none must not be used for "
938+
"token_endpoint_auth_signing_alg_values_supported"
939+
)
940+
933941
if "RS256" not in self["id_token_signing_alg_values_supported"]:
934942
raise ValueError('RS256 missing from id_token_signing_alg_values_supported')
935943

@@ -939,7 +947,7 @@ def verify(self, **kwargs):
939947
raise ValueError('Issuer ID invalid')
940948

941949
if any("code" in rt for rt in self[
942-
"response_types_supported"]) and "token_endpoint" not in self:
950+
"response_types_supported"]) and "token_endpoint" not in self:
943951
raise MissingRequiredAttribute("token_endpoint")
944952

945953
return True

0 commit comments

Comments
 (0)