@sphereon/ssi-sdk.kms-rest-client 0.34.1-feature.IDK.11.48 → 0.34.1-feature.IDK.11.50
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/dist/index.cjs +1056 -1185
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1137 -17
- package/dist/index.d.ts +1137 -17
- package/dist/index.js +1049 -1179
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/plugin.schema.json +38 -157
- package/src/agent/KmsRestClient.ts +19 -20
- package/src/index.ts +1 -1
- package/src/models/AwsAssumeRoleCredentials.ts +49 -57
- package/src/models/AwsClientConfiguration.ts +29 -32
- package/src/models/AwsKmsSetting.ts +71 -85
- package/src/models/AwsStaticCredentials.ts +49 -57
- package/src/models/AwsWebIdentityTokenCredentials.ts +50 -58
- package/src/models/AzureClientSecretCredentialOpts.ts +45 -50
- package/src/models/AzureCredentialOpts.ts +24 -29
- package/src/models/AzureKeyVaultSetting.ts +60 -71
- package/src/models/CoseKey.ts +96 -104
- package/src/models/CoseKeyPair.ts +32 -38
- package/src/models/CoseKeyType.ts +18 -21
- package/src/models/CreateKeyProvider.ts +60 -74
- package/src/models/CreateRawSignature.ts +33 -39
- package/src/models/CreateRawSignatureResponse.ts +22 -25
- package/src/models/CreateSimpleSignature.ts +45 -59
- package/src/models/CryptoAlg.ts +18 -21
- package/src/models/Curve.ts +22 -25
- package/src/models/DigestAlg.ts +21 -24
- package/src/models/ErrorResponse.ts +39 -42
- package/src/models/GenerateKey.ts +51 -65
- package/src/models/GenerateKeyGlobal.ts +59 -73
- package/src/models/GenerateKeyResponse.ts +24 -30
- package/src/models/GetKeyResponse.ts +24 -30
- package/src/models/IdentifierMethod.ts +19 -22
- package/src/models/JoseKeyPair.ts +32 -38
- package/src/models/Jwk.ts +190 -207
- package/src/models/JwkKeyType.ts +18 -21
- package/src/models/JwkUse.ts +16 -19
- package/src/models/KeyEncoding.ts +16 -19
- package/src/models/KeyInfo.ts +103 -123
- package/src/models/KeyOperations.ts +22 -25
- package/src/models/KeyProvider.ts +33 -41
- package/src/models/KeyProviderResponse.ts +33 -41
- package/src/models/KeyProviderType.ts +17 -20
- package/src/models/KeyResolver.ts +44 -51
- package/src/models/KeyType.ts +17 -20
- package/src/models/KeyVisibility.ts +16 -19
- package/src/models/ListKeyProvidersResponse.ts +24 -30
- package/src/models/ListKeysResponse.ts +24 -30
- package/src/models/ListResolversResponse.ts +24 -30
- package/src/models/LookupMode.ts +17 -20
- package/src/models/ManagedKeyInfo.ts +106 -126
- package/src/models/ManagedKeyPair.ts +61 -70
- package/src/models/MaskGenFunction.ts +15 -18
- package/src/models/ProviderCapabilities.ts +65 -81
- package/src/models/ResolvePublicKey.ts +50 -61
- package/src/models/ResolvedKeyInfo.ts +104 -124
- package/src/models/Resolver.ts +44 -51
- package/src/models/SignInput.ts +42 -47
- package/src/models/SignOutput.ts +32 -38
- package/src/models/Signature.ts +51 -62
- package/src/models/SignatureAlgorithm.ts +26 -29
- package/src/models/StoreKey.ts +32 -38
- package/src/models/StoreKeyResponse.ts +24 -30
- package/src/models/UpdateKeyProvider.ts +49 -58
- package/src/models/VerifyRawSignature.ts +42 -48
- package/src/models/VerifyRawSignatureResponse.ts +22 -25
- package/src/models/VerifySimpleSignature.ts +35 -44
- package/src/models/index.ts +58 -58
- package/src/types/IKmsRestClient.ts +2 -2
|
@@ -12,21 +12,12 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import type { KeyOperations } from './KeyOperations'
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} from './
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
SignatureAlgorithmFromJSON,
|
|
23
|
-
SignatureAlgorithmToJSON,
|
|
24
|
-
} from './SignatureAlgorithm';
|
|
25
|
-
import type { JwkUse } from './JwkUse';
|
|
26
|
-
import {
|
|
27
|
-
JwkUseFromJSON,
|
|
28
|
-
JwkUseToJSON,
|
|
29
|
-
} from './JwkUse';
|
|
15
|
+
import type { KeyOperations } from './KeyOperations'
|
|
16
|
+
import { KeyOperationsFromJSON, KeyOperationsToJSON } from './KeyOperations'
|
|
17
|
+
import type { SignatureAlgorithm } from './SignatureAlgorithm'
|
|
18
|
+
import { SignatureAlgorithmFromJSON, SignatureAlgorithmToJSON } from './SignatureAlgorithm'
|
|
19
|
+
import type { JwkUse } from './JwkUse'
|
|
20
|
+
import { JwkUseFromJSON, JwkUseToJSON } from './JwkUse'
|
|
30
21
|
|
|
31
22
|
/**
|
|
32
23
|
* Parameters for key generation.
|
|
@@ -34,73 +25,68 @@ import {
|
|
|
34
25
|
* @interface GenerateKey
|
|
35
26
|
*/
|
|
36
27
|
export interface GenerateKey {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Alias for the generated key.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof GenerateKey
|
|
32
|
+
*/
|
|
33
|
+
alias?: string
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {JwkUse}
|
|
37
|
+
* @memberof GenerateKey
|
|
38
|
+
*/
|
|
39
|
+
use?: JwkUse
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {Array<KeyOperations>}
|
|
43
|
+
* @memberof GenerateKey
|
|
44
|
+
*/
|
|
45
|
+
keyOperations?: Array<KeyOperations>
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {SignatureAlgorithm}
|
|
49
|
+
* @memberof GenerateKey
|
|
50
|
+
*/
|
|
51
|
+
alg?: SignatureAlgorithm
|
|
61
52
|
}
|
|
62
53
|
|
|
63
|
-
|
|
64
|
-
|
|
65
54
|
/**
|
|
66
55
|
* Check if a given object implements the GenerateKey interface.
|
|
67
56
|
*/
|
|
68
57
|
export function instanceOfGenerateKey(value: object): value is GenerateKey {
|
|
69
|
-
|
|
58
|
+
return true
|
|
70
59
|
}
|
|
71
60
|
|
|
72
61
|
export function GenerateKeyFromJSON(json: any): GenerateKey {
|
|
73
|
-
|
|
62
|
+
return GenerateKeyFromJSONTyped(json, false)
|
|
74
63
|
}
|
|
75
64
|
|
|
76
65
|
export function GenerateKeyFromJSONTyped(json: any, ignoreDiscriminator: boolean): GenerateKey {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
};
|
|
66
|
+
if (json == null) {
|
|
67
|
+
return json
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
alias: json['alias'] == null ? undefined : json['alias'],
|
|
71
|
+
use: json['use'] == null ? undefined : JwkUseFromJSON(json['use']),
|
|
72
|
+
keyOperations: json['keyOperations'] == null ? undefined : (json['keyOperations'] as Array<any>).map(KeyOperationsFromJSON),
|
|
73
|
+
alg: json['alg'] == null ? undefined : SignatureAlgorithmFromJSON(json['alg']),
|
|
74
|
+
}
|
|
87
75
|
}
|
|
88
76
|
|
|
89
77
|
export function GenerateKeyToJSON(json: any): GenerateKey {
|
|
90
|
-
|
|
78
|
+
return GenerateKeyToJSONTyped(json, false)
|
|
91
79
|
}
|
|
92
80
|
|
|
93
81
|
export function GenerateKeyToJSONTyped(value?: GenerateKey | null, ignoreDiscriminator: boolean = false): any {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
82
|
+
if (value == null) {
|
|
83
|
+
return value
|
|
84
|
+
}
|
|
97
85
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
};
|
|
86
|
+
return {
|
|
87
|
+
alias: value['alias'],
|
|
88
|
+
use: JwkUseToJSON(value['use']),
|
|
89
|
+
keyOperations: value['keyOperations'] == null ? undefined : (value['keyOperations'] as Array<any>).map(KeyOperationsToJSON),
|
|
90
|
+
alg: SignatureAlgorithmToJSON(value['alg']),
|
|
91
|
+
}
|
|
105
92
|
}
|
|
106
|
-
|
|
@@ -12,21 +12,12 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import type { KeyOperations } from './KeyOperations'
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} from './
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
SignatureAlgorithmFromJSON,
|
|
23
|
-
SignatureAlgorithmToJSON,
|
|
24
|
-
} from './SignatureAlgorithm';
|
|
25
|
-
import type { JwkUse } from './JwkUse';
|
|
26
|
-
import {
|
|
27
|
-
JwkUseFromJSON,
|
|
28
|
-
JwkUseToJSON,
|
|
29
|
-
} from './JwkUse';
|
|
15
|
+
import type { KeyOperations } from './KeyOperations'
|
|
16
|
+
import { KeyOperationsFromJSON, KeyOperationsToJSON } from './KeyOperations'
|
|
17
|
+
import type { SignatureAlgorithm } from './SignatureAlgorithm'
|
|
18
|
+
import { SignatureAlgorithmFromJSON, SignatureAlgorithmToJSON } from './SignatureAlgorithm'
|
|
19
|
+
import type { JwkUse } from './JwkUse'
|
|
20
|
+
import { JwkUseFromJSON, JwkUseToJSON } from './JwkUse'
|
|
30
21
|
|
|
31
22
|
/**
|
|
32
23
|
* Parameters for global key generation with optional provider specification.
|
|
@@ -34,81 +25,76 @@ import {
|
|
|
34
25
|
* @interface GenerateKeyGlobal
|
|
35
26
|
*/
|
|
36
27
|
export interface GenerateKeyGlobal {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Alias for the generated key.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof GenerateKeyGlobal
|
|
32
|
+
*/
|
|
33
|
+
alias?: string
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {JwkUse}
|
|
37
|
+
* @memberof GenerateKeyGlobal
|
|
38
|
+
*/
|
|
39
|
+
use?: JwkUse
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {Array<KeyOperations>}
|
|
43
|
+
* @memberof GenerateKeyGlobal
|
|
44
|
+
*/
|
|
45
|
+
keyOperations?: Array<KeyOperations>
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {SignatureAlgorithm}
|
|
49
|
+
* @memberof GenerateKeyGlobal
|
|
50
|
+
*/
|
|
51
|
+
alg?: SignatureAlgorithm
|
|
52
|
+
/**
|
|
53
|
+
* Optional provider ID. If not specified, the default provider will be used.
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof GenerateKeyGlobal
|
|
56
|
+
*/
|
|
57
|
+
providerId?: string
|
|
67
58
|
}
|
|
68
59
|
|
|
69
|
-
|
|
70
|
-
|
|
71
60
|
/**
|
|
72
61
|
* Check if a given object implements the GenerateKeyGlobal interface.
|
|
73
62
|
*/
|
|
74
63
|
export function instanceOfGenerateKeyGlobal(value: object): value is GenerateKeyGlobal {
|
|
75
|
-
|
|
64
|
+
return true
|
|
76
65
|
}
|
|
77
66
|
|
|
78
67
|
export function GenerateKeyGlobalFromJSON(json: any): GenerateKeyGlobal {
|
|
79
|
-
|
|
68
|
+
return GenerateKeyGlobalFromJSONTyped(json, false)
|
|
80
69
|
}
|
|
81
70
|
|
|
82
71
|
export function GenerateKeyGlobalFromJSONTyped(json: any, ignoreDiscriminator: boolean): GenerateKeyGlobal {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
};
|
|
72
|
+
if (json == null) {
|
|
73
|
+
return json
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
alias: json['alias'] == null ? undefined : json['alias'],
|
|
77
|
+
use: json['use'] == null ? undefined : JwkUseFromJSON(json['use']),
|
|
78
|
+
keyOperations: json['keyOperations'] == null ? undefined : (json['keyOperations'] as Array<any>).map(KeyOperationsFromJSON),
|
|
79
|
+
alg: json['alg'] == null ? undefined : SignatureAlgorithmFromJSON(json['alg']),
|
|
80
|
+
providerId: json['providerId'] == null ? undefined : json['providerId'],
|
|
81
|
+
}
|
|
94
82
|
}
|
|
95
83
|
|
|
96
84
|
export function GenerateKeyGlobalToJSON(json: any): GenerateKeyGlobal {
|
|
97
|
-
|
|
85
|
+
return GenerateKeyGlobalToJSONTyped(json, false)
|
|
98
86
|
}
|
|
99
87
|
|
|
100
88
|
export function GenerateKeyGlobalToJSONTyped(value?: GenerateKeyGlobal | null, ignoreDiscriminator: boolean = false): any {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
89
|
+
if (value == null) {
|
|
90
|
+
return value
|
|
91
|
+
}
|
|
104
92
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
};
|
|
93
|
+
return {
|
|
94
|
+
alias: value['alias'],
|
|
95
|
+
use: JwkUseToJSON(value['use']),
|
|
96
|
+
keyOperations: value['keyOperations'] == null ? undefined : (value['keyOperations'] as Array<any>).map(KeyOperationsToJSON),
|
|
97
|
+
alg: SignatureAlgorithmToJSON(value['alg']),
|
|
98
|
+
providerId: value['providerId'],
|
|
99
|
+
}
|
|
113
100
|
}
|
|
114
|
-
|
|
@@ -12,11 +12,8 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import type { ManagedKeyPair } from './ManagedKeyPair'
|
|
16
|
-
import {
|
|
17
|
-
ManagedKeyPairFromJSON,
|
|
18
|
-
ManagedKeyPairToJSON,
|
|
19
|
-
} from './ManagedKeyPair';
|
|
15
|
+
import type { ManagedKeyPair } from './ManagedKeyPair'
|
|
16
|
+
import { ManagedKeyPairFromJSON, ManagedKeyPairToJSON } from './ManagedKeyPair'
|
|
20
17
|
|
|
21
18
|
/**
|
|
22
19
|
* Response body containing a generated key pair.
|
|
@@ -24,48 +21,45 @@ import {
|
|
|
24
21
|
* @interface GenerateKeyResponse
|
|
25
22
|
*/
|
|
26
23
|
export interface GenerateKeyResponse {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {ManagedKeyPair}
|
|
27
|
+
* @memberof GenerateKeyResponse
|
|
28
|
+
*/
|
|
29
|
+
keyPair: ManagedKeyPair
|
|
33
30
|
}
|
|
34
31
|
|
|
35
32
|
/**
|
|
36
33
|
* Check if a given object implements the GenerateKeyResponse interface.
|
|
37
34
|
*/
|
|
38
35
|
export function instanceOfGenerateKeyResponse(value: object): value is GenerateKeyResponse {
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
if (!('keyPair' in value) || value['keyPair'] === undefined) return false
|
|
37
|
+
return true
|
|
41
38
|
}
|
|
42
39
|
|
|
43
40
|
export function GenerateKeyResponseFromJSON(json: any): GenerateKeyResponse {
|
|
44
|
-
|
|
41
|
+
return GenerateKeyResponseFromJSONTyped(json, false)
|
|
45
42
|
}
|
|
46
43
|
|
|
47
44
|
export function GenerateKeyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GenerateKeyResponse {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
45
|
+
if (json == null) {
|
|
46
|
+
return json
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
keyPair: ManagedKeyPairFromJSON(json['keyPair']),
|
|
50
|
+
}
|
|
55
51
|
}
|
|
56
52
|
|
|
57
53
|
export function GenerateKeyResponseToJSON(json: any): GenerateKeyResponse {
|
|
58
|
-
|
|
54
|
+
return GenerateKeyResponseToJSONTyped(json, false)
|
|
59
55
|
}
|
|
60
56
|
|
|
61
57
|
export function GenerateKeyResponseToJSONTyped(value?: GenerateKeyResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return {
|
|
58
|
+
if (value == null) {
|
|
59
|
+
return value
|
|
60
|
+
}
|
|
67
61
|
|
|
68
|
-
|
|
69
|
-
|
|
62
|
+
return {
|
|
63
|
+
keyPair: ManagedKeyPairToJSON(value['keyPair']),
|
|
64
|
+
}
|
|
70
65
|
}
|
|
71
|
-
|
|
@@ -12,11 +12,8 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import type { ManagedKeyInfo } from './ManagedKeyInfo'
|
|
16
|
-
import {
|
|
17
|
-
ManagedKeyInfoFromJSON,
|
|
18
|
-
ManagedKeyInfoToJSON,
|
|
19
|
-
} from './ManagedKeyInfo';
|
|
15
|
+
import type { ManagedKeyInfo } from './ManagedKeyInfo'
|
|
16
|
+
import { ManagedKeyInfoFromJSON, ManagedKeyInfoToJSON } from './ManagedKeyInfo'
|
|
20
17
|
|
|
21
18
|
/**
|
|
22
19
|
* Response body containing a managed key.
|
|
@@ -24,48 +21,45 @@ import {
|
|
|
24
21
|
* @interface GetKeyResponse
|
|
25
22
|
*/
|
|
26
23
|
export interface GetKeyResponse {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {ManagedKeyInfo}
|
|
27
|
+
* @memberof GetKeyResponse
|
|
28
|
+
*/
|
|
29
|
+
keyInfo: ManagedKeyInfo
|
|
33
30
|
}
|
|
34
31
|
|
|
35
32
|
/**
|
|
36
33
|
* Check if a given object implements the GetKeyResponse interface.
|
|
37
34
|
*/
|
|
38
35
|
export function instanceOfGetKeyResponse(value: object): value is GetKeyResponse {
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
if (!('keyInfo' in value) || value['keyInfo'] === undefined) return false
|
|
37
|
+
return true
|
|
41
38
|
}
|
|
42
39
|
|
|
43
40
|
export function GetKeyResponseFromJSON(json: any): GetKeyResponse {
|
|
44
|
-
|
|
41
|
+
return GetKeyResponseFromJSONTyped(json, false)
|
|
45
42
|
}
|
|
46
43
|
|
|
47
44
|
export function GetKeyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetKeyResponse {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
45
|
+
if (json == null) {
|
|
46
|
+
return json
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
keyInfo: ManagedKeyInfoFromJSON(json['keyInfo']),
|
|
50
|
+
}
|
|
55
51
|
}
|
|
56
52
|
|
|
57
53
|
export function GetKeyResponseToJSON(json: any): GetKeyResponse {
|
|
58
|
-
|
|
54
|
+
return GetKeyResponseToJSONTyped(json, false)
|
|
59
55
|
}
|
|
60
56
|
|
|
61
57
|
export function GetKeyResponseToJSONTyped(value?: GetKeyResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return {
|
|
58
|
+
if (value == null) {
|
|
59
|
+
return value
|
|
60
|
+
}
|
|
67
61
|
|
|
68
|
-
|
|
69
|
-
|
|
62
|
+
return {
|
|
63
|
+
keyInfo: ManagedKeyInfoToJSON(value['keyInfo']),
|
|
64
|
+
}
|
|
70
65
|
}
|
|
71
|
-
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* KMS REST Server API
|
|
5
|
-
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: 0.0.1
|
|
8
8
|
* Contact: support@sphereon.com
|
|
@@ -12,45 +12,42 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
/**
|
|
17
16
|
* Method used to identify cryptographic keys.
|
|
18
17
|
* @export
|
|
19
18
|
*/
|
|
20
19
|
export const IdentifierMethod = {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
} as const
|
|
27
|
-
export type IdentifierMethod = typeof IdentifierMethod[keyof typeof IdentifierMethod]
|
|
28
|
-
|
|
20
|
+
Jwk: 'JWK',
|
|
21
|
+
Kid: 'KID',
|
|
22
|
+
CoseKey: 'COSE_KEY',
|
|
23
|
+
X5C: 'X5C',
|
|
24
|
+
Did: 'DID',
|
|
25
|
+
} as const
|
|
26
|
+
export type IdentifierMethod = (typeof IdentifierMethod)[keyof typeof IdentifierMethod]
|
|
29
27
|
|
|
30
28
|
export function instanceOfIdentifierMethod(value: any): boolean {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
29
|
+
for (const key in IdentifierMethod) {
|
|
30
|
+
if (Object.prototype.hasOwnProperty.call(IdentifierMethod, key)) {
|
|
31
|
+
if (IdentifierMethod[key as keyof typeof IdentifierMethod] === value) {
|
|
32
|
+
return true
|
|
33
|
+
}
|
|
37
34
|
}
|
|
38
|
-
|
|
35
|
+
}
|
|
36
|
+
return false
|
|
39
37
|
}
|
|
40
38
|
|
|
41
39
|
export function IdentifierMethodFromJSON(json: any): IdentifierMethod {
|
|
42
|
-
|
|
40
|
+
return IdentifierMethodFromJSONTyped(json, false)
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
export function IdentifierMethodFromJSONTyped(json: any, ignoreDiscriminator: boolean): IdentifierMethod {
|
|
46
|
-
|
|
44
|
+
return json as IdentifierMethod
|
|
47
45
|
}
|
|
48
46
|
|
|
49
47
|
export function IdentifierMethodToJSON(value?: IdentifierMethod | null): any {
|
|
50
|
-
|
|
48
|
+
return value as any
|
|
51
49
|
}
|
|
52
50
|
|
|
53
51
|
export function IdentifierMethodToJSONTyped(value: any, ignoreDiscriminator: boolean): IdentifierMethod {
|
|
54
|
-
|
|
52
|
+
return value as IdentifierMethod
|
|
55
53
|
}
|
|
56
|
-
|
|
@@ -12,11 +12,8 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import type { Jwk } from './Jwk'
|
|
16
|
-
import {
|
|
17
|
-
JwkFromJSON,
|
|
18
|
-
JwkToJSON,
|
|
19
|
-
} from './Jwk';
|
|
15
|
+
import type { Jwk } from './Jwk'
|
|
16
|
+
import { JwkFromJSON, JwkToJSON } from './Jwk'
|
|
20
17
|
|
|
21
18
|
/**
|
|
22
19
|
* Data class representing a cryptographic key pair used with JOSE (JSON Object Signing and Encryption).
|
|
@@ -24,56 +21,53 @@ import {
|
|
|
24
21
|
* @interface JoseKeyPair
|
|
25
22
|
*/
|
|
26
23
|
export interface JoseKeyPair {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {Jwk}
|
|
27
|
+
* @memberof JoseKeyPair
|
|
28
|
+
*/
|
|
29
|
+
privateJwk?: Jwk
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Jwk}
|
|
33
|
+
* @memberof JoseKeyPair
|
|
34
|
+
*/
|
|
35
|
+
publicJwk: Jwk
|
|
39
36
|
}
|
|
40
37
|
|
|
41
38
|
/**
|
|
42
39
|
* Check if a given object implements the JoseKeyPair interface.
|
|
43
40
|
*/
|
|
44
41
|
export function instanceOfJoseKeyPair(value: object): value is JoseKeyPair {
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
if (!('publicJwk' in value) || value['publicJwk'] === undefined) return false
|
|
43
|
+
return true
|
|
47
44
|
}
|
|
48
45
|
|
|
49
46
|
export function JoseKeyPairFromJSON(json: any): JoseKeyPair {
|
|
50
|
-
|
|
47
|
+
return JoseKeyPairFromJSONTyped(json, false)
|
|
51
48
|
}
|
|
52
49
|
|
|
53
50
|
export function JoseKeyPairFromJSONTyped(json: any, ignoreDiscriminator: boolean): JoseKeyPair {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
};
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
privateJwk: json['privateJwk'] == null ? undefined : JwkFromJSON(json['privateJwk']),
|
|
56
|
+
publicJwk: JwkFromJSON(json['publicJwk']),
|
|
57
|
+
}
|
|
62
58
|
}
|
|
63
59
|
|
|
64
60
|
export function JoseKeyPairToJSON(json: any): JoseKeyPair {
|
|
65
|
-
|
|
61
|
+
return JoseKeyPairToJSONTyped(json, false)
|
|
66
62
|
}
|
|
67
63
|
|
|
68
64
|
export function JoseKeyPairToJSONTyped(value?: JoseKeyPair | null, ignoreDiscriminator: boolean = false): any {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
return {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value
|
|
67
|
+
}
|
|
74
68
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
69
|
+
return {
|
|
70
|
+
privateJwk: JwkToJSON(value['privateJwk']),
|
|
71
|
+
publicJwk: JwkToJSON(value['publicJwk']),
|
|
72
|
+
}
|
|
78
73
|
}
|
|
79
|
-
|