File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 55from workos .utils .http_client import AsyncHTTPClient , SyncHTTPClient
66from workos .utils .request_helper import REQUEST_METHOD_POST
77
8+ API_KEY_VALIDATION_PATH = "api_keys/validations"
89
910
1011class ApiKeysModule (Protocol ):
@@ -33,7 +34,7 @@ def __init__(self, http_client: SyncHTTPClient):
3334
3435 def validate_api_key (self , * , value : str ) -> ApiKey :
3536 response = self ._http_client .request (
36- "api_keys/validations" , method = REQUEST_METHOD_POST , json = {
37+ API_KEY_VALIDATION_PATH , method = REQUEST_METHOD_POST , json = {
3738 "value" : value }
3839 )
3940 return ApiKey .model_validate (response ["api_key" ])
@@ -47,7 +48,7 @@ def __init__(self, http_client: AsyncHTTPClient):
4748
4849 async def validate_api_key (self , * , value : str ) -> ApiKey :
4950 response = await self ._http_client .request (
50- "api_keys/validations" , method = REQUEST_METHOD_POST , json = {
51+ API_KEY_VALIDATION_PATH , method = REQUEST_METHOD_POST , json = {
5152 "value" : value }
5253 )
5354 return ApiKey .model_validate (response ["api_key" ])
You can’t perform that action at this time.
0 commit comments