File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -148,3 +148,12 @@ New in MSAL Python 1.26
148148
149149 .. automethod :: __init__
150150
151+
152+ Exceptions
153+ ----------
154+ These are exceptions that MSAL Python may raise.
155+ You should not need to create them directly.
156+ You may want to catch them to provide a better error message to your end users.
157+
158+ .. autoclass :: msal.IdTokenError
159+
Original file line number Diff line number Diff line change 3131 ConfidentialClientApplication ,
3232 PublicClientApplication ,
3333 )
34- from .oauth2cli .oidc import Prompt
34+ from .oauth2cli .oidc import Prompt , IdTokenError
3535from .token_cache import TokenCache , SerializableTokenCache
3636from .auth_scheme import PopAuthScheme
37-
Original file line number Diff line number Diff line change 11from tests import unittest
22
3- import oauth2cli
3+ import msal
4+ from msal import oauth2cli
45
56
67class TestIdToken (unittest .TestCase ):
@@ -16,6 +17,6 @@ def test_id_token_should_tolerate_time_error(self):
1617 }, "id_token is decoded correctly, without raising exception" )
1718
1819 def test_id_token_should_error_out_on_client_id_error (self ):
19- with self .assertRaises (oauth2cli .IdTokenError ):
20+ with self .assertRaises (msal .IdTokenError ):
2021 oauth2cli .oidc .decode_id_token (self .EXPIRED_ID_TOKEN , client_id = "not foo" )
2122
You can’t perform that action at this time.
0 commit comments