@@ -142,7 +142,7 @@ import os
142142
143143with Glean(
144144 security = models.Security(
145- act_as_bearer_token = os.getenv(" GLEAN_ACT_AS_BEARER_TOKEN " , " " ),
145+ api_token = os.getenv(" GLEAN_API_TOKEN " , " " ),
146146 ),
147147) as g_client:
148148
@@ -173,7 +173,7 @@ async def main():
173173
174174 async with Glean(
175175 security = models.Security(
176- act_as_bearer_token = os.getenv(" GLEAN_ACT_AS_BEARER_TOKEN " , " " ),
176+ api_token = os.getenv(" GLEAN_API_TOKEN " , " " ),
177177 ),
178178 ) as g_client:
179179
@@ -203,7 +203,7 @@ import os
203203
204204with Glean(
205205 security = models.Security(
206- act_as_bearer_token = os.getenv(" GLEAN_ACT_AS_BEARER_TOKEN " , " " ),
206+ api_token = os.getenv(" GLEAN_API_TOKEN " , " " ),
207207 ),
208208) as g_client:
209209
@@ -234,7 +234,7 @@ async def main():
234234
235235 async with Glean(
236236 security = models.Security(
237- act_as_bearer_token = os.getenv(" GLEAN_ACT_AS_BEARER_TOKEN " , " " ),
237+ api_token = os.getenv(" GLEAN_API_TOKEN " , " " ),
238238 ),
239239 ) as g_client:
240240
@@ -262,10 +262,10 @@ asyncio.run(main())
262262
263263This SDK supports the following security schemes globally:
264264
265- | Name | Type | Scheme | Environment Variable |
266- | --------------------- | ------ | ------- | ------- -------------------- |
267- | ` act_as_bearer_token ` | apiKey | API key | ` GLEAN_ACT_AS_BEARER_TOKEN ` |
268- | ` cookie_auth ` | apiKey | API key | ` GLEAN_COOKIE_AUTH ` |
265+ | Name | Type | Scheme | Environment Variable |
266+ | ------------- | ------ | ----------- | -------------------- |
267+ | ` api_token ` | http | HTTP Bearer | ` GLEAN_API_TOKEN ` |
268+ | ` cookie_auth ` | apiKey | API key | ` GLEAN_COOKIE_AUTH ` |
269269
270270You can set the security parameters through the ` security ` optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:
271271``` python
@@ -276,7 +276,7 @@ import os
276276
277277with Glean(
278278 security = models.Security(
279- act_as_bearer_token = os.getenv(" GLEAN_ACT_AS_BEARER_TOKEN " , " " ),
279+ api_token = os.getenv(" GLEAN_API_TOKEN " , " " ),
280280 ),
281281) as g_client:
282282
@@ -562,7 +562,7 @@ import os
562562
563563with Glean(
564564 security = models.Security(
565- act_as_bearer_token = os.getenv(" GLEAN_ACT_AS_BEARER_TOKEN " , " " ),
565+ api_token = os.getenv(" GLEAN_API_TOKEN " , " " ),
566566 ),
567567) as g_client:
568568
@@ -606,7 +606,7 @@ import os
606606with Glean(
607607 retry_config = RetryConfig(" backoff" , BackoffStrategy(1 , 50 , 1.1 , 100 ), False ),
608608 security = models.Security(
609- act_as_bearer_token = os.getenv(" GLEAN_ACT_AS_BEARER_TOKEN " , " " ),
609+ api_token = os.getenv(" GLEAN_API_TOKEN " , " " ),
610610 ),
611611) as g_client:
612612
@@ -746,7 +746,7 @@ import os
746746with Glean(
747747 instance = " <value>"
748748 security = models.Security(
749- act_as_bearer_token = os.getenv(" GLEAN_ACT_AS_BEARER_TOKEN " , " " ),
749+ api_token = os.getenv(" GLEAN_API_TOKEN " , " " ),
750750 ),
751751) as g_client:
752752
@@ -791,7 +791,7 @@ import os
791791with Glean(
792792 server_url = " https://instance-name-be.glean.com" ,
793793 security = models.Security(
794- act_as_bearer_token = os.getenv(" GLEAN_ACT_AS_BEARER_TOKEN " , " " ),
794+ api_token = os.getenv(" GLEAN_API_TOKEN " , " " ),
795795 ),
796796) as g_client:
797797
@@ -920,7 +920,7 @@ def main():
920920
921921 with Glean(
922922 security = models.Security(
923- act_as_bearer_token = os.getenv(" GLEAN_ACT_AS_BEARER_TOKEN " , " " ),
923+ api_token = os.getenv(" GLEAN_API_TOKEN " , " " ),
924924 ),
925925 ) as g_client:
926926 # Rest of application here...
@@ -931,7 +931,7 @@ async def amain():
931931
932932 async with Glean(
933933 security = models.Security(
934- act_as_bearer_token = os.getenv(" GLEAN_ACT_AS_BEARER_TOKEN " , " " ),
934+ api_token = os.getenv(" GLEAN_API_TOKEN " , " " ),
935935 ),
936936 ) as g_client:
937937 # Rest of application here...
0 commit comments