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
@@ -34,6 +36,7 @@ public final class ECDSAKey: OpenSSLKey {
34
36
///
35
37
/// - parameters:
36
38
/// - pem: Contents of pem file.
39
+
@available(*, deprecated, message:"Unavailable in v5. Please use ES256PublicKey(certificate:), ES384PublicKey(certificate:), or ES512PublicKey(certificate:) instead. Note that more interfaces for importing keys is available once you update fully to v5.")
@@ -52,6 +55,7 @@ public final class ECDSAKey: OpenSSLKey {
52
55
///
53
56
/// - parameters:
54
57
/// - pem: Contents of pem file.
58
+
@available(*, deprecated, message:"Unavailable in v5. Please use ES256PublicKey(certificate:), ES384PublicKey(certificate:), or ES512PublicKey(certificate:) instead. Note that more interfaces for importing keys is available once you update fully to v5.")
@@ -68,10 +72,12 @@ public final class ECDSAKey: OpenSSLKey {
68
72
returnself.init(c)
69
73
}
70
74
75
+
@available(*, deprecated, message:"Unavailable in v5. Please use ES256PublicKey(pem:), ES384PublicKey(pem:), or ES512PublicKey(pem:) instead. Note that more interfaces for importing keys is available once you update fully to v5.")
@available(*, deprecated, message:"Unavailable in v5. Please use ES256PublicKey(pem:), ES384PublicKey(pem:), or ES512PublicKey(pem:) instead. Note that more interfaces for importing keys is available once you update fully to v5.")
@@ -81,10 +87,12 @@ public final class ECDSAKey: OpenSSLKey {
81
87
returnself.init(c)
82
88
}
83
89
90
+
@available(*, deprecated, message:"Unavailable in v5. Please use ES256PrivateKey(pem:), ES384PrivateKey(pem:), or ES512PrivateKey(pem:) instead. Note that more interfaces for importing keys is available once you update fully to v5.")
@available(*, deprecated, message:"Unavailable in v5. Please use ES256PrivateKey(pem:), ES384PrivateKey(pem:), or ES512PrivateKey(pem:) instead. Note that more interfaces for importing keys is available once you update fully to v5.")
@@ -100,6 +108,7 @@ public final class ECDSAKey: OpenSSLKey {
100
108
self.c = c
101
109
}
102
110
111
+
@available(*, deprecated, message:"Unavailable in v5. Please use ES256PublicKey(parameters:), ES384PublicKey(parameters:), or ES512PublicKey(parameters:) instead. Note that more interfaces for importing private keys is available once you update fully to v5.")
/// ECDSA.PublicKey was introduced in v5 and replaces ``ECDSAKey``.
227
+
///
228
+
/// - Note: Please migrate over to ``ECDSA/PublicKey`` before updating to v5, though if you plan on remaining on v4, ``ECDSAKey`` can continue to be used.
/// Initializes a new ``ECDSA.PublicKey` with ECDSA parameters.
273
+
///
274
+
/// - Parameters:
275
+
/// - parameters: The ``ECDSAParameters`` tuple containing the x and y coordinates of the public key. These coordinates should be base64 URL encoded strings.
276
+
///
277
+
/// - Throws:
278
+
/// - ``JWTError/generic`` with the identifier `ecCoordinates` if the x and y coordinates from `parameters` cannot be interpreted as base64 encoded data.
279
+
/// - ``JWTError/generic`` with the identifier `ecPrivateKey` if the provided `privateKey` is non-nil but cannot be interpreted as a valid `PrivateKey`.
280
+
///
281
+
/// - Note:
282
+
/// The ``ECDSAParameters`` tuple is assumed to have x and y properties that are base64 URL encoded strings representing the respective coordinates of an ECDSA public key.
/// ECDSA.PrivateKey was introduced in v5 and replaces ``ECDSAKey``.
289
+
///
290
+
/// - Note: Please migrate over to ``ECDSA/PrivateKey`` before updating to v5, though if you plan on remaining on v4, ``ECDSAKey`` can continue to be used.
/// A JWT payload is a Publically Readable set of claims
2
2
/// Each variable represents a claim.
3
+
/// - Warning: Requirements changed in v5 to be async. Please also conform to ``AsyncJWTPayload`` while on v4, and remove the ``AsyncJWTPayload`` conformance once you do update to v5.
3
4
publicprotocolJWTPayload:Codable{
4
5
/// Verifies that the payload's claims are correct or throws an error.
5
6
func verify(using signer:JWTSigner)throws
6
7
}
8
+
9
+
/// A transitionary protocol with sync and async requirements.
10
+
///
11
+
/// This protocol should be dropped once you are finished migrating to v5, as it'll have been renamed back to ``JWTPayload``, but with a single async requirement. In order to support both versions v4 and v5 in a library, do not implement the requirements of ``JWTPayload`` as ``JWTSigner`` is no longer available in v5.
0 commit comments