11import asyncio
22import os
3+ import warnings
34import weakref
45from enum import Enum , IntEnum
56from typing import Any , List , Optional , Union , cast
@@ -103,6 +104,12 @@ class OidcIdTokenVerification(Verification):
103104 method_type = VerificationMethodType .OIDC_ID_TOKEN
104105
105106 def __init__ (self , oidc_id_token : str ):
107+ warnings .warn (
108+ "The entire OIDC flow has been reworked in version 4.2.0, "
109+ '"OidcIdTokenVerification" has been deprecated as a result, '
110+ 'use "OidcAuthorizationCodeVerification" instead' ,
111+ DeprecationWarning ,
112+ )
106113 self .oidc_id_token = oidc_id_token
107114
108115
@@ -820,6 +827,12 @@ async def stop(self) -> None:
820827
821828 async def create_oidc_nonce (self ) -> str :
822829 """Create a nonce to use in oidc authorization code flow"""
830+ warnings .warn (
831+ "The entire OIDC flow has been reworked in version 4.2.0, "
832+ 'method "create_oidc_nonce" has been deprecated as a result' ,
833+ DeprecationWarning ,
834+ )
835+
823836 c_future = tankerlib .tanker_create_oidc_nonce (self .c_tanker )
824837 c_voidp = await ffihelpers .handle_tanker_future (c_future )
825838 c_str = ffi .cast ("char*" , c_voidp )
@@ -835,6 +848,12 @@ async def _set_oidc_test_nonce(self, nonce: str) -> None:
835848
836849 async def set_oidc_test_nonce (self , nonce : str ) -> None :
837850 """Set the oidc nonce to use during the next verification operation"""
851+ warnings .warn (
852+ "The entire OIDC flow has been reworked in version 4.2.0, "
853+ 'method "set_oidc_test_nonce" has been deprecated as a result' ,
854+ DeprecationWarning ,
855+ )
856+
838857 await self ._set_oidc_test_nonce (nonce )
839858
840859 async def encrypt (
0 commit comments