Keys
Info
This reference provides a detailed implementation of the keyring types included in the SDK. All of these keyrings are based on the JWK (JSON Web Key) standard defined in RFC 7517. For more information about the keyring specification, please refer to the keyring spec.
SignKeyRing
dataclass
__iter__()
Yield alg
and jwk
headers specified in RFC 7517-7516 standard.
Returns:
Type | Description |
---|---|
Setting
|
The iterable header settings to associate |
Source code in nucleus/sdk/expose/key.py
70 71 72 73 74 75 76 |
|
as_dict()
Exports the key in the standard JSON format.
Returns:
Type | Description |
---|---|
Raw
|
A portable representation of the key in JWK format. |
Source code in nucleus/sdk/expose/key.py
109 110 111 112 113 114 |
|
fingerprint()
Return the base64 decoded thumbprint as specified by RFC 7638.
Returns:
Type | Description |
---|---|
str
|
The decoded sha256 thumbprint. |
Source code in nucleus/sdk/expose/key.py
131 132 133 134 135 136 137 138 |
|
from_dict(jwk)
classmethod
Creates a Keyring object from a JWK (JSON Web Key) dictionary.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
jwk |
Raw
|
The JWK dictionary to import |
required |
Returns:
Type | Description |
---|---|
SignKeyRing
|
SignKeyRing object |
Source code in nucleus/sdk/expose/key.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
|
import_key(jwk)
Restore the internal key associated with a JWK (JSON Web Key).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
jwk |
Raw
|
The JWK to restore. |
required |
Returns:
Type | Description |
---|---|
SignKeyRing
|
SignKeyRing object |
Source code in nucleus/sdk/expose/key.py
98 99 100 101 102 103 104 105 106 107 |
|
jwk()
Return the internal JWK (JSON Web Key) instance
Returns:
Type | Description |
---|---|
JWK
|
The JWK (JSON Web Key) instance |
Source code in nucleus/sdk/expose/key.py
91 92 93 94 95 96 |
|