(access_control)
Operations related to access control/signing keys api
- create - Create a signing key
- get_all - Retrieves signing keys
- delete - Delete Signing Key
- get - Retrieves a signing key
- update - Update a signing key
The publicKey is a representation of the public key, encoded as base 64 and is passed as a string, and the privateKey is displayed only on creation. This is the only moment where the client can save the private key, otherwise it will be lost. Remember to decode your string when signing JWTs. Up to 10 signing keys can be generated, after that you must delete at least one signing key to create a new one.
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.access_control.create()
if res.signing_key is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.CreateSigningKeyResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Retrieves signing keys
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.access_control.get_all()
if res.data is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.GetSigningKeysResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Delete Signing Key
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.access_control.delete(key_id="<value>")
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
key_id |
str | ✔️ | ID of the signing key |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.DeleteSigningKeyResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Retrieves a signing key
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.access_control.get(key_id="<value>")
if res.signing_key is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
key_id |
str | ✔️ | ID of the signing key |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.GetSigningKeyResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Update a signing key
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.access_control.update(key_id="<value>", request_body={})
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
key_id |
str | ✔️ | ID of the signing key |
request_body |
operations.UpdateSigningKeyRequestBody | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.UpdateSigningKeyResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |