1
1
import asyncio
2
2
import os
3
+ import warnings
3
4
import weakref
4
5
from enum import Enum , IntEnum
5
6
from typing import Any , List , Optional , Union , cast
@@ -103,6 +104,12 @@ class OidcIdTokenVerification(Verification):
103
104
method_type = VerificationMethodType .OIDC_ID_TOKEN
104
105
105
106
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
+ )
106
113
self .oidc_id_token = oidc_id_token
107
114
108
115
@@ -820,6 +827,12 @@ async def stop(self) -> None:
820
827
821
828
async def create_oidc_nonce (self ) -> str :
822
829
"""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
+
823
836
c_future = tankerlib .tanker_create_oidc_nonce (self .c_tanker )
824
837
c_voidp = await ffihelpers .handle_tanker_future (c_future )
825
838
c_str = ffi .cast ("char*" , c_voidp )
@@ -835,6 +848,12 @@ async def _set_oidc_test_nonce(self, nonce: str) -> None:
835
848
836
849
async def set_oidc_test_nonce (self , nonce : str ) -> None :
837
850
"""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
+
838
857
await self ._set_oidc_test_nonce (nonce )
839
858
840
859
async def encrypt (
0 commit comments