|
6 | 6 | from urllib.parse import parse_qs |
7 | 7 | from urllib.parse import urlencode |
8 | 8 |
|
9 | | -import pytest |
10 | 9 | from cryptojwt.exception import BadSignature |
11 | 10 | from cryptojwt.exception import UnsupportedAlgorithm |
12 | 11 | from cryptojwt.jws.exception import SignerAlgError |
13 | 12 | from cryptojwt.jws.utils import left_hash |
14 | 13 | from cryptojwt.jwt import JWT |
15 | 14 | from cryptojwt.key_bundle import KeyBundle |
16 | 15 | from cryptojwt.key_jar import KeyJar |
| 16 | +import pytest |
17 | 17 |
|
18 | 18 | from oidcmsg import proper_path |
19 | 19 | from oidcmsg import time_util |
20 | 20 | from oidcmsg.exception import MessageException |
21 | 21 | from oidcmsg.exception import MissingRequiredAttribute |
22 | 22 | from oidcmsg.exception import NotAllowedValue |
23 | 23 | from oidcmsg.exception import OidcMsgError |
24 | | -from oidcmsg.oauth2 import ResponseMessage |
25 | 24 | from oidcmsg.oauth2 import ROPCAccessTokenRequest |
26 | | -from oidcmsg.oidc import JRD |
| 25 | +from oidcmsg.oauth2 import ResponseMessage |
27 | 26 | from oidcmsg.oidc import AccessTokenRequest |
28 | 27 | from oidcmsg.oidc import AccessTokenResponse |
29 | 28 | from oidcmsg.oidc import AddressClaim |
|
38 | 37 | from oidcmsg.oidc import EXPError |
39 | 38 | from oidcmsg.oidc import IATError |
40 | 39 | from oidcmsg.oidc import IdToken |
| 40 | +from oidcmsg.oidc import JRD |
41 | 41 | from oidcmsg.oidc import Link |
42 | 42 | from oidcmsg.oidc import OpenIDSchema |
43 | 43 | from oidcmsg.oidc import ProviderConfigurationResponse |
@@ -661,7 +661,7 @@ def test_deserialize(self): |
661 | 661 | "client_secret_expires_at": 1577858400, |
662 | 662 | "registration_access_token": "this.is.an.access.token.value.ffx83", |
663 | 663 | "registration_client_uri": "https://server.example.com/connect/register?client_id" |
664 | | - "=s6BhdRkqt3", |
| 664 | + "=s6BhdRkqt3", |
665 | 665 | "token_endpoint_auth_method": "client_secret_basic", |
666 | 666 | "application_type": "web", |
667 | 667 | "redirect_uris": [ |
@@ -1601,3 +1601,17 @@ def test_correct_sign_alg(): |
1601 | 1601 | client_id="554295ce3770612820620000", |
1602 | 1602 | allowed_sign_alg="HS256", |
1603 | 1603 | ) |
| 1604 | + |
| 1605 | + |
| 1606 | +def test_ID_Token_space_in_id(): |
| 1607 | + idt = IdToken(**{ |
| 1608 | + "at_hash": "buCCujNN632UIV8-VbKhgw", |
| 1609 | + "sub": "user-subject-1234531", |
| 1610 | + "aud": "client_ifCttPphtLxtPWd20602 ^.+/", |
| 1611 | + "iss": "https://www.certification.openid.net/test/a/idpy/", |
| 1612 | + "exp": 1632495959, |
| 1613 | + "nonce": "B88En9UpdHkQZMQXK9U3KHzV", |
| 1614 | + "iat": 1632495659 |
| 1615 | + }) |
| 1616 | + |
| 1617 | + assert idt["aud"] == "client_ifCttPphtLxtPWd20602 ^.+/" |
0 commit comments