@sphereon/ssi-sdk.kms-rest-client 0.34.1-feature.IDK.11.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/dist/index.cjs +2083 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1468 -0
- package/dist/index.d.ts +1468 -0
- package/dist/index.js +2063 -0
- package/dist/index.js.map +1 -0
- package/package.json +60 -0
- package/plugin.schema.json +1123 -0
- package/src/agent/KmsRestClient.ts +468 -0
- package/src/index.ts +7 -0
- package/src/models/AwsAssumeRoleCredentials.ts +98 -0
- package/src/models/AwsClientConfiguration.ts +72 -0
- package/src/models/AwsKmsSetting.ts +126 -0
- package/src/models/AwsStaticCredentials.ts +98 -0
- package/src/models/AwsWebIdentityTokenCredentials.ts +99 -0
- package/src/models/AzureClientSecretCredentialOpts.ts +90 -0
- package/src/models/AzureCredentialOpts.ts +70 -0
- package/src/models/AzureKeyVaultSetting.ts +112 -0
- package/src/models/CoseKey.ts +145 -0
- package/src/models/CoseKeyPair.ts +79 -0
- package/src/models/CoseKeyType.ts +55 -0
- package/src/models/CreateKeyProvider.ts +115 -0
- package/src/models/CreateRawSignature.ts +80 -0
- package/src/models/CreateRawSignatureResponse.ts +65 -0
- package/src/models/CreateSimpleSignature.ts +100 -0
- package/src/models/CryptoAlg.ts +55 -0
- package/src/models/Curve.ts +59 -0
- package/src/models/DigestAlg.ts +58 -0
- package/src/models/ErrorResponse.ts +82 -0
- package/src/models/GenerateKey.ts +106 -0
- package/src/models/GenerateKeyGlobal.ts +114 -0
- package/src/models/GenerateKeyResponse.ts +71 -0
- package/src/models/GetKeyResponse.ts +71 -0
- package/src/models/IdentifierMethod.ts +56 -0
- package/src/models/JoseKeyPair.ts +79 -0
- package/src/models/Jwk.ts +248 -0
- package/src/models/JwkKeyType.ts +55 -0
- package/src/models/JwkUse.ts +53 -0
- package/src/models/KeyEncoding.ts +53 -0
- package/src/models/KeyInfo.ts +164 -0
- package/src/models/KeyOperations.ts +59 -0
- package/src/models/KeyProvider.ts +82 -0
- package/src/models/KeyProviderResponse.ts +82 -0
- package/src/models/KeyProviderType.ts +54 -0
- package/src/models/KeyResolver.ts +92 -0
- package/src/models/KeyType.ts +54 -0
- package/src/models/KeyVisibility.ts +53 -0
- package/src/models/ListKeyProvidersResponse.ts +71 -0
- package/src/models/ListKeysResponse.ts +71 -0
- package/src/models/ListResolversResponse.ts +71 -0
- package/src/models/LookupMode.ts +54 -0
- package/src/models/ManagedKeyInfo.ts +167 -0
- package/src/models/ManagedKeyPair.ts +111 -0
- package/src/models/MaskGenFunction.ts +52 -0
- package/src/models/ProviderCapabilities.ts +122 -0
- package/src/models/ResolvePublicKey.ts +102 -0
- package/src/models/ResolvedKeyInfo.ts +165 -0
- package/src/models/Resolver.ts +92 -0
- package/src/models/SignInput.ts +92 -0
- package/src/models/SignOutput.ts +79 -0
- package/src/models/Signature.ts +103 -0
- package/src/models/SignatureAlgorithm.ts +63 -0
- package/src/models/StoreKey.ts +79 -0
- package/src/models/StoreKeyResponse.ts +71 -0
- package/src/models/UpdateKeyProvider.ts +99 -0
- package/src/models/VerifyRawSignature.ts +89 -0
- package/src/models/VerifyRawSignatureResponse.ts +65 -0
- package/src/models/VerifySimpleSignature.ts +85 -0
- package/src/models/index.ts +60 -0
- package/src/types/IKmsRestClient.ts +133 -0
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* KMS REST Server API
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: support@sphereon.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { Curve } from './Curve';
|
|
16
|
+
import {
|
|
17
|
+
CurveFromJSON,
|
|
18
|
+
CurveToJSON,
|
|
19
|
+
} from './Curve';
|
|
20
|
+
import type { KeyOperations } from './KeyOperations';
|
|
21
|
+
import {
|
|
22
|
+
KeyOperationsFromJSON,
|
|
23
|
+
KeyOperationsToJSON,
|
|
24
|
+
} from './KeyOperations';
|
|
25
|
+
import type { JwkUse } from './JwkUse';
|
|
26
|
+
import {
|
|
27
|
+
JwkUseFromJSON,
|
|
28
|
+
JwkUseToJSON,
|
|
29
|
+
} from './JwkUse';
|
|
30
|
+
import type { JwkKeyType } from './JwkKeyType';
|
|
31
|
+
import {
|
|
32
|
+
JwkKeyTypeFromJSON,
|
|
33
|
+
JwkKeyTypeToJSON,
|
|
34
|
+
} from './JwkKeyType';
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Represents a JSON Web Key (JWK) as defined by the JSON Web Key specification.
|
|
38
|
+
* @export
|
|
39
|
+
* @interface Jwk
|
|
40
|
+
*/
|
|
41
|
+
export interface Jwk {
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {JwkKeyType}
|
|
45
|
+
* @memberof Jwk
|
|
46
|
+
*/
|
|
47
|
+
kty: JwkKeyType;
|
|
48
|
+
/**
|
|
49
|
+
* Key identifier used to uniquely identify the key.
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof Jwk
|
|
52
|
+
*/
|
|
53
|
+
kid?: string;
|
|
54
|
+
/**
|
|
55
|
+
* The algorithm intended for use with the key (JWA algorithm name).
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof Jwk
|
|
58
|
+
*/
|
|
59
|
+
alg?: string;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {JwkUse}
|
|
63
|
+
* @memberof Jwk
|
|
64
|
+
*/
|
|
65
|
+
use?: JwkUse;
|
|
66
|
+
/**
|
|
67
|
+
* The allowed cryptographic operations for the key.
|
|
68
|
+
* @type {Array<KeyOperations>}
|
|
69
|
+
* @memberof Jwk
|
|
70
|
+
*/
|
|
71
|
+
keyOps?: Array<KeyOperations>;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {Curve}
|
|
75
|
+
* @memberof Jwk
|
|
76
|
+
*/
|
|
77
|
+
crv?: Curve;
|
|
78
|
+
/**
|
|
79
|
+
* The x coordinate for elliptic curve keys (base64url-encoded).
|
|
80
|
+
* @type {string}
|
|
81
|
+
* @memberof Jwk
|
|
82
|
+
*/
|
|
83
|
+
x?: string;
|
|
84
|
+
/**
|
|
85
|
+
* The y coordinate for elliptic curve keys (base64url-encoded).
|
|
86
|
+
* @type {string}
|
|
87
|
+
* @memberof Jwk
|
|
88
|
+
*/
|
|
89
|
+
y?: string;
|
|
90
|
+
/**
|
|
91
|
+
* The private key parameter (base64url-encoded).
|
|
92
|
+
* @type {string}
|
|
93
|
+
* @memberof Jwk
|
|
94
|
+
*/
|
|
95
|
+
d?: string;
|
|
96
|
+
/**
|
|
97
|
+
* The modulus value for RSA keys (base64url-encoded).
|
|
98
|
+
* @type {string}
|
|
99
|
+
* @memberof Jwk
|
|
100
|
+
*/
|
|
101
|
+
n?: string;
|
|
102
|
+
/**
|
|
103
|
+
* The public exponent for RSA keys (base64url-encoded).
|
|
104
|
+
* @type {string}
|
|
105
|
+
* @memberof Jwk
|
|
106
|
+
*/
|
|
107
|
+
e?: string;
|
|
108
|
+
/**
|
|
109
|
+
* The first prime factor for RSA private keys (base64url-encoded).
|
|
110
|
+
* @type {string}
|
|
111
|
+
* @memberof Jwk
|
|
112
|
+
*/
|
|
113
|
+
p?: string;
|
|
114
|
+
/**
|
|
115
|
+
* The second prime factor for RSA private keys (base64url-encoded).
|
|
116
|
+
* @type {string}
|
|
117
|
+
* @memberof Jwk
|
|
118
|
+
*/
|
|
119
|
+
q?: string;
|
|
120
|
+
/**
|
|
121
|
+
* The first factor CRT exponent for RSA private keys (base64url-encoded).
|
|
122
|
+
* @type {string}
|
|
123
|
+
* @memberof Jwk
|
|
124
|
+
*/
|
|
125
|
+
dp?: string;
|
|
126
|
+
/**
|
|
127
|
+
* The second factor CRT exponent for RSA private keys (base64url-encoded).
|
|
128
|
+
* @type {string}
|
|
129
|
+
* @memberof Jwk
|
|
130
|
+
*/
|
|
131
|
+
dq?: string;
|
|
132
|
+
/**
|
|
133
|
+
* The first CRT coefficient for RSA private keys (base64url-encoded).
|
|
134
|
+
* @type {string}
|
|
135
|
+
* @memberof Jwk
|
|
136
|
+
*/
|
|
137
|
+
qi?: string;
|
|
138
|
+
/**
|
|
139
|
+
* The symmetric key value (base64url-encoded).
|
|
140
|
+
* @type {string}
|
|
141
|
+
* @memberof Jwk
|
|
142
|
+
*/
|
|
143
|
+
k?: string;
|
|
144
|
+
/**
|
|
145
|
+
* X.509 certificate chain as base64-encoded DER certificates.
|
|
146
|
+
* @type {Array<string>}
|
|
147
|
+
* @memberof Jwk
|
|
148
|
+
*/
|
|
149
|
+
x5c?: Array<string>;
|
|
150
|
+
/**
|
|
151
|
+
* X.509 certificate SHA-1 thumbprint (base64url-encoded).
|
|
152
|
+
* @type {string}
|
|
153
|
+
* @memberof Jwk
|
|
154
|
+
*/
|
|
155
|
+
x5t?: string;
|
|
156
|
+
/**
|
|
157
|
+
* URL pointing to X.509 certificate or certificate chain.
|
|
158
|
+
* @type {string}
|
|
159
|
+
* @memberof Jwk
|
|
160
|
+
*/
|
|
161
|
+
x5u?: string;
|
|
162
|
+
/**
|
|
163
|
+
* X.509 certificate SHA-256 thumbprint (base64url-encoded).
|
|
164
|
+
* @type {string}
|
|
165
|
+
* @memberof Jwk
|
|
166
|
+
*/
|
|
167
|
+
x5tS256?: string;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Check if a given object implements the Jwk interface.
|
|
174
|
+
*/
|
|
175
|
+
export function instanceOfJwk(value: object): value is Jwk {
|
|
176
|
+
if (!('kty' in value) || value['kty'] === undefined) return false;
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export function JwkFromJSON(json: any): Jwk {
|
|
181
|
+
return JwkFromJSONTyped(json, false);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export function JwkFromJSONTyped(json: any, ignoreDiscriminator: boolean): Jwk {
|
|
185
|
+
if (json == null) {
|
|
186
|
+
return json;
|
|
187
|
+
}
|
|
188
|
+
return {
|
|
189
|
+
|
|
190
|
+
'kty': JwkKeyTypeFromJSON(json['kty']),
|
|
191
|
+
'kid': json['kid'] == null ? undefined : json['kid'],
|
|
192
|
+
'alg': json['alg'] == null ? undefined : json['alg'],
|
|
193
|
+
'use': json['use'] == null ? undefined : JwkUseFromJSON(json['use']),
|
|
194
|
+
'keyOps': json['key_ops'] == null ? undefined : ((json['key_ops'] as Array<any>).map(KeyOperationsFromJSON)),
|
|
195
|
+
'crv': json['crv'] == null ? undefined : CurveFromJSON(json['crv']),
|
|
196
|
+
'x': json['x'] == null ? undefined : json['x'],
|
|
197
|
+
'y': json['y'] == null ? undefined : json['y'],
|
|
198
|
+
'd': json['d'] == null ? undefined : json['d'],
|
|
199
|
+
'n': json['n'] == null ? undefined : json['n'],
|
|
200
|
+
'e': json['e'] == null ? undefined : json['e'],
|
|
201
|
+
'p': json['p'] == null ? undefined : json['p'],
|
|
202
|
+
'q': json['q'] == null ? undefined : json['q'],
|
|
203
|
+
'dp': json['dp'] == null ? undefined : json['dp'],
|
|
204
|
+
'dq': json['dq'] == null ? undefined : json['dq'],
|
|
205
|
+
'qi': json['qi'] == null ? undefined : json['qi'],
|
|
206
|
+
'k': json['k'] == null ? undefined : json['k'],
|
|
207
|
+
'x5c': json['x5c'] == null ? undefined : json['x5c'],
|
|
208
|
+
'x5t': json['x5t'] == null ? undefined : json['x5t'],
|
|
209
|
+
'x5u': json['x5u'] == null ? undefined : json['x5u'],
|
|
210
|
+
'x5tS256': json['x5t#S256'] == null ? undefined : json['x5t#S256'],
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export function JwkToJSON(json: any): Jwk {
|
|
215
|
+
return JwkToJSONTyped(json, false);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export function JwkToJSONTyped(value?: Jwk | null, ignoreDiscriminator: boolean = false): any {
|
|
219
|
+
if (value == null) {
|
|
220
|
+
return value;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
return {
|
|
224
|
+
|
|
225
|
+
'kty': JwkKeyTypeToJSON(value['kty']),
|
|
226
|
+
'kid': value['kid'],
|
|
227
|
+
'alg': value['alg'],
|
|
228
|
+
'use': JwkUseToJSON(value['use']),
|
|
229
|
+
'key_ops': value['keyOps'] == null ? undefined : ((value['keyOps'] as Array<any>).map(KeyOperationsToJSON)),
|
|
230
|
+
'crv': CurveToJSON(value['crv']),
|
|
231
|
+
'x': value['x'],
|
|
232
|
+
'y': value['y'],
|
|
233
|
+
'd': value['d'],
|
|
234
|
+
'n': value['n'],
|
|
235
|
+
'e': value['e'],
|
|
236
|
+
'p': value['p'],
|
|
237
|
+
'q': value['q'],
|
|
238
|
+
'dp': value['dp'],
|
|
239
|
+
'dq': value['dq'],
|
|
240
|
+
'qi': value['qi'],
|
|
241
|
+
'k': value['k'],
|
|
242
|
+
'x5c': value['x5c'],
|
|
243
|
+
'x5t': value['x5t'],
|
|
244
|
+
'x5u': value['x5u'],
|
|
245
|
+
'x5t#S256': value['x5tS256'],
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* KMS REST Server API
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: support@sphereon.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* JSON Web Key (JWK) key type parameter identifying the cryptographic algorithm family.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const JwkKeyType = {
|
|
21
|
+
Ec: 'EC',
|
|
22
|
+
Rsa: 'RSA',
|
|
23
|
+
Okp: 'OKP',
|
|
24
|
+
Oct: 'oct'
|
|
25
|
+
} as const;
|
|
26
|
+
export type JwkKeyType = typeof JwkKeyType[keyof typeof JwkKeyType];
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
export function instanceOfJwkKeyType(value: any): boolean {
|
|
30
|
+
for (const key in JwkKeyType) {
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(JwkKeyType, key)) {
|
|
32
|
+
if (JwkKeyType[key as keyof typeof JwkKeyType] === value) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function JwkKeyTypeFromJSON(json: any): JwkKeyType {
|
|
41
|
+
return JwkKeyTypeFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function JwkKeyTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): JwkKeyType {
|
|
45
|
+
return json as JwkKeyType;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function JwkKeyTypeToJSON(value?: JwkKeyType | null): any {
|
|
49
|
+
return value as any;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function JwkKeyTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): JwkKeyType {
|
|
53
|
+
return value as JwkKeyType;
|
|
54
|
+
}
|
|
55
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* KMS REST Server API
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: support@sphereon.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Intended use of the key (signing or encryption).
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const JwkUse = {
|
|
21
|
+
Sig: 'sig',
|
|
22
|
+
Enc: 'enc'
|
|
23
|
+
} as const;
|
|
24
|
+
export type JwkUse = typeof JwkUse[keyof typeof JwkUse];
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export function instanceOfJwkUse(value: any): boolean {
|
|
28
|
+
for (const key in JwkUse) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(JwkUse, key)) {
|
|
30
|
+
if (JwkUse[key as keyof typeof JwkUse] === value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function JwkUseFromJSON(json: any): JwkUse {
|
|
39
|
+
return JwkUseFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function JwkUseFromJSONTyped(json: any, ignoreDiscriminator: boolean): JwkUse {
|
|
43
|
+
return json as JwkUse;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function JwkUseToJSON(value?: JwkUse | null): any {
|
|
47
|
+
return value as any;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function JwkUseToJSONTyped(value: any, ignoreDiscriminator: boolean): JwkUse {
|
|
51
|
+
return value as JwkUse;
|
|
52
|
+
}
|
|
53
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* KMS REST Server API
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: support@sphereon.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The encoding format of the cryptographic key.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const KeyEncoding = {
|
|
21
|
+
Cose: 'COSE',
|
|
22
|
+
Jose: 'JOSE'
|
|
23
|
+
} as const;
|
|
24
|
+
export type KeyEncoding = typeof KeyEncoding[keyof typeof KeyEncoding];
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export function instanceOfKeyEncoding(value: any): boolean {
|
|
28
|
+
for (const key in KeyEncoding) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(KeyEncoding, key)) {
|
|
30
|
+
if (KeyEncoding[key as keyof typeof KeyEncoding] === value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function KeyEncodingFromJSON(json: any): KeyEncoding {
|
|
39
|
+
return KeyEncodingFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function KeyEncodingFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyEncoding {
|
|
43
|
+
return json as KeyEncoding;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function KeyEncodingToJSON(value?: KeyEncoding | null): any {
|
|
47
|
+
return value as any;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function KeyEncodingToJSONTyped(value: any, ignoreDiscriminator: boolean): KeyEncoding {
|
|
51
|
+
return value as KeyEncoding;
|
|
52
|
+
}
|
|
53
|
+
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* KMS REST Server API
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: support@sphereon.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { KeyType } from './KeyType';
|
|
16
|
+
import {
|
|
17
|
+
KeyTypeFromJSON,
|
|
18
|
+
KeyTypeToJSON,
|
|
19
|
+
} from './KeyType';
|
|
20
|
+
import type { KeyVisibility } from './KeyVisibility';
|
|
21
|
+
import {
|
|
22
|
+
KeyVisibilityFromJSON,
|
|
23
|
+
KeyVisibilityToJSON,
|
|
24
|
+
} from './KeyVisibility';
|
|
25
|
+
import type { SignatureAlgorithm } from './SignatureAlgorithm';
|
|
26
|
+
import {
|
|
27
|
+
SignatureAlgorithmFromJSON,
|
|
28
|
+
SignatureAlgorithmToJSON,
|
|
29
|
+
} from './SignatureAlgorithm';
|
|
30
|
+
import type { KeyEncoding } from './KeyEncoding';
|
|
31
|
+
import {
|
|
32
|
+
KeyEncodingFromJSON,
|
|
33
|
+
KeyEncodingToJSON,
|
|
34
|
+
} from './KeyEncoding';
|
|
35
|
+
import type { Jwk } from './Jwk';
|
|
36
|
+
import {
|
|
37
|
+
JwkFromJSON,
|
|
38
|
+
JwkToJSON,
|
|
39
|
+
} from './Jwk';
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Information about a cryptographic key, providing metadata and configuration details necessary for cryptographic operations.
|
|
43
|
+
* @export
|
|
44
|
+
* @interface KeyInfo
|
|
45
|
+
*/
|
|
46
|
+
export interface KeyInfo {
|
|
47
|
+
/**
|
|
48
|
+
* Unique identifier for the cryptographic key. Can be null if the key identifier is not provided.
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof KeyInfo
|
|
51
|
+
*/
|
|
52
|
+
kid?: string;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {Jwk}
|
|
56
|
+
* @memberof KeyInfo
|
|
57
|
+
*/
|
|
58
|
+
key?: Jwk;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {SignatureAlgorithm}
|
|
62
|
+
* @memberof KeyInfo
|
|
63
|
+
*/
|
|
64
|
+
signatureAlgorithm?: SignatureAlgorithm;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {KeyVisibility}
|
|
68
|
+
* @memberof KeyInfo
|
|
69
|
+
*/
|
|
70
|
+
keyVisibility?: KeyVisibility;
|
|
71
|
+
/**
|
|
72
|
+
* X.509 certificate chain associated with the key.
|
|
73
|
+
* @type {Array<string>}
|
|
74
|
+
* @memberof KeyInfo
|
|
75
|
+
*/
|
|
76
|
+
x5c?: Array<string>;
|
|
77
|
+
/**
|
|
78
|
+
* A reference or alias to the key in the Key Management Service (KMS).
|
|
79
|
+
* @type {string}
|
|
80
|
+
* @memberof KeyInfo
|
|
81
|
+
*/
|
|
82
|
+
alias?: string;
|
|
83
|
+
/**
|
|
84
|
+
* The Key Management System (KMS) identifier associated with the key.
|
|
85
|
+
* @type {string}
|
|
86
|
+
* @memberof KeyInfo
|
|
87
|
+
*/
|
|
88
|
+
providerId?: string;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @type {KeyType}
|
|
92
|
+
* @memberof KeyInfo
|
|
93
|
+
*/
|
|
94
|
+
keyType?: KeyType;
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* @type {KeyEncoding}
|
|
98
|
+
* @memberof KeyInfo
|
|
99
|
+
*/
|
|
100
|
+
keyEncoding?: KeyEncoding;
|
|
101
|
+
/**
|
|
102
|
+
* Additional configuration options as key-value pairs.
|
|
103
|
+
* @type {{ [key: string]: string; }}
|
|
104
|
+
* @memberof KeyInfo
|
|
105
|
+
*/
|
|
106
|
+
opts?: { [key: string]: string; };
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Check if a given object implements the KeyInfo interface.
|
|
113
|
+
*/
|
|
114
|
+
export function instanceOfKeyInfo(value: object): value is KeyInfo {
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function KeyInfoFromJSON(json: any): KeyInfo {
|
|
119
|
+
return KeyInfoFromJSONTyped(json, false);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function KeyInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyInfo {
|
|
123
|
+
if (json == null) {
|
|
124
|
+
return json;
|
|
125
|
+
}
|
|
126
|
+
return {
|
|
127
|
+
|
|
128
|
+
'kid': json['kid'] == null ? undefined : json['kid'],
|
|
129
|
+
'key': json['key'] == null ? undefined : JwkFromJSON(json['key']),
|
|
130
|
+
'signatureAlgorithm': json['signatureAlgorithm'] == null ? undefined : SignatureAlgorithmFromJSON(json['signatureAlgorithm']),
|
|
131
|
+
'keyVisibility': json['keyVisibility'] == null ? undefined : KeyVisibilityFromJSON(json['keyVisibility']),
|
|
132
|
+
'x5c': json['x5c'] == null ? undefined : json['x5c'],
|
|
133
|
+
'alias': json['alias'] == null ? undefined : json['alias'],
|
|
134
|
+
'providerId': json['providerId'] == null ? undefined : json['providerId'],
|
|
135
|
+
'keyType': json['keyType'] == null ? undefined : KeyTypeFromJSON(json['keyType']),
|
|
136
|
+
'keyEncoding': json['keyEncoding'] == null ? undefined : KeyEncodingFromJSON(json['keyEncoding']),
|
|
137
|
+
'opts': json['opts'] == null ? undefined : json['opts'],
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function KeyInfoToJSON(json: any): KeyInfo {
|
|
142
|
+
return KeyInfoToJSONTyped(json, false);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function KeyInfoToJSONTyped(value?: KeyInfo | null, ignoreDiscriminator: boolean = false): any {
|
|
146
|
+
if (value == null) {
|
|
147
|
+
return value;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
return {
|
|
151
|
+
|
|
152
|
+
'kid': value['kid'],
|
|
153
|
+
'key': JwkToJSON(value['key']),
|
|
154
|
+
'signatureAlgorithm': SignatureAlgorithmToJSON(value['signatureAlgorithm']),
|
|
155
|
+
'keyVisibility': KeyVisibilityToJSON(value['keyVisibility']),
|
|
156
|
+
'x5c': value['x5c'],
|
|
157
|
+
'alias': value['alias'],
|
|
158
|
+
'providerId': value['providerId'],
|
|
159
|
+
'keyType': KeyTypeToJSON(value['keyType']),
|
|
160
|
+
'keyEncoding': KeyEncodingToJSON(value['keyEncoding']),
|
|
161
|
+
'opts': value['opts'],
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* KMS REST Server API
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: support@sphereon.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Specific operations the key is intended for.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const KeyOperations = {
|
|
21
|
+
Sign: 'sign',
|
|
22
|
+
Verify: 'verify',
|
|
23
|
+
Encrypt: 'encrypt',
|
|
24
|
+
Decrypt: 'decrypt',
|
|
25
|
+
WrapKey: 'wrapKey',
|
|
26
|
+
UnwrapKey: 'unwrapKey',
|
|
27
|
+
DeriveKey: 'deriveKey',
|
|
28
|
+
DeriveBits: 'deriveBits'
|
|
29
|
+
} as const;
|
|
30
|
+
export type KeyOperations = typeof KeyOperations[keyof typeof KeyOperations];
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
export function instanceOfKeyOperations(value: any): boolean {
|
|
34
|
+
for (const key in KeyOperations) {
|
|
35
|
+
if (Object.prototype.hasOwnProperty.call(KeyOperations, key)) {
|
|
36
|
+
if (KeyOperations[key as keyof typeof KeyOperations] === value) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function KeyOperationsFromJSON(json: any): KeyOperations {
|
|
45
|
+
return KeyOperationsFromJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function KeyOperationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyOperations {
|
|
49
|
+
return json as KeyOperations;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function KeyOperationsToJSON(value?: KeyOperations | null): any {
|
|
53
|
+
return value as any;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function KeyOperationsToJSONTyped(value: any, ignoreDiscriminator: boolean): KeyOperations {
|
|
57
|
+
return value as KeyOperations;
|
|
58
|
+
}
|
|
59
|
+
|