You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> auth = ads.auth.create_signer(config=config) # api_key type of authentication dictionary created based on provided config
293
322
323
+
>>> config={
324
+
... user=ocid1.user.oc1..<unique_ID>,
325
+
... fingerprint=<fingerprint>,
326
+
... tenancy=ocid1.tenancy.oc1..<unique_ID>,
327
+
... region=us-ashburn-1,
328
+
... key_content=<private key content>,
329
+
... }
330
+
>>> auth = ads.auth.create_signer(config=config) # api_key type of authentication dictionary with private key content created based on provided config
331
+
332
+
>>> config={
333
+
... user=ocid1.user.oc1..<unique_ID>,
334
+
... fingerprint=<fingerprint>,
335
+
... tenancy=ocid1.tenancy.oc1..<unique_ID>,
336
+
... region=us-ashburn-1,
337
+
... key_file=~/.oci/oci_api_key.pem,
338
+
... }
339
+
>>> auth = ads.auth.create_signer(config=config) # api_key type of authentication dictionary with private key file location created based on provided config
ads.set_auth(config= config) # default signer is set to API Keys with private key content
99
+
85
100
ads.set_auth("resource_principal") # default signer is set to resource principal authentication
86
101
ads.set_auth("instance_principal") # default signer is set to instance principal authentication
87
102
@@ -121,7 +136,7 @@ In the this example, the default authentication uses API keys specified with the
121
136
os_auth = authutil.resource_principal() # use resource principal to as the preferred way to access object store
122
137
123
138
124
-
More signers can be created using the ``create_signer()`` method. With the ``auth_type`` parameter set to ``instance_principal``, the method will return a signer that uses instance principals. For other signers there are ``signer``or ``signer_callable`` parameters. Here are examples:
139
+
More signers can be created using the ``create_signer()`` method. With the ``auth_type`` parameter set to ``instance_principal``, the method will return a signer that uses instance principals. For other signers there are ``signer``, ``signer_callable`` or ``signer_kwargs`` parameters. Here are examples:
0 commit comments