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
@@ -180,11 +180,15 @@ The `WebPushTesting` module can be used to obtain a mocked `WebPushManager` inst
180
180
181
181
## Specifications
182
182
183
+
-[RFC 7515 JSON Web Signature (JWS)](https://datatracker.ietf.org/doc/html/rfc7515)
184
+
-[RFC 7519 JSON Web Token (JWT)](https://datatracker.ietf.org/doc/html/rfc7519)
183
185
-[RFC 8030 Generic Event Delivery Using HTTP Push](https://datatracker.ietf.org/doc/html/rfc8030)
184
186
-[RFC 8188 Encrypted Content-Encoding for HTTP](https://datatracker.ietf.org/doc/html/rfc8188)
185
187
-[RFC 8291 Message Encryption for Web Push](https://datatracker.ietf.org/doc/html/rfc8291)
186
188
-[RFC 8292 Voluntary Application Server Identification (VAPID) for Web Push](https://datatracker.ietf.org/doc/html/rfc8292)
187
189
190
+
-[Push API Working Draft](https://www.w3.org/TR/push-api/)
191
+
188
192
## Contributing
189
193
190
194
Contribution is welcome! Please take a look at the issues already available, or start a new discussion to propose a new feature. Although guarantees can't be made regarding feature requests, PRs that fit within the goals of the project and that have been discussed beforehand are more than welcome!
/// The public key component in a format suitable for user agents to consume.
97
+
///
98
+
/// - SeeAlso: [Push API Working Draft §7.2. `PushSubscriptionOptions` Interface](https://www.w3.org/TR/push-api/#dom-pushsubscriptionoptions-applicationserverkey)
99
+
/// - SeeAlso: [RFC 8292 Voluntary Application Server Identification (VAPID) for Web Push §3.2. Public Key Parameter ("k")](https://datatracker.ietf.org/doc/html/rfc8292#section-3.2)
Copy file name to clipboardExpand all lines: Sources/WebPush/VAPID/VAPIDToken.swift
+33-4Lines changed: 33 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -13,39 +13,62 @@ extension VAPID {
13
13
/// An internal representation the token and authorization headers used self-identification.
14
14
///
15
15
/// - SeeAlso: [RFC 8292 Voluntary Application Server Identification (VAPID) for Web Push §2. Application Server Self-Identification](https://datatracker.ietf.org/doc/html/rfc8292#section-2)
16
+
/// - SeeAlso: [RFC 7515 JSON Web Signature (JWS)](https://datatracker.ietf.org/doc/html/rfc7515)
17
+
///- SeeAlso: [RFC 7519 JSON Web Token (JWT)](https://datatracker.ietf.org/doc/html/rfc7519)
16
18
structToken:Hashable,Codable,Sendable{
17
19
enumCodingKeys:String,CodingKey{
18
20
case audience ="aud"
19
21
case subject ="sub"
20
22
case expiration ="exp"
21
23
}
22
24
25
+
/// The audience claim, which encodes the origin of the ``Subscriber/endpoint``
/// - SeeAlso: [RFC 8292 Voluntary Application Server Identification (VAPID) for Web Push §2. Application Server Self-Identification](https://datatracker.ietf.org/doc/html/rfc8292#section-2)
23
30
varaudience:String
24
-
varsubject:VAPID.Configuration.ContactInformation
31
+
32
+
/// The subject claim, which encodes contact information for the application server.
/// - SeeAlso: [RFC 8292 Voluntary Application Server Identification (VAPID) for Web Push §2.1. Application Server Contact Information](https://datatracker.ietf.org/doc/html/rfc8292#section-2.1)
36
+
varsubject:Configuration.ContactInformation
37
+
38
+
/// The expiry claim, which encodes the number of seconds after 1970/01/01 when the token expires.
/// - SeeAlso: [RFC 8292 Voluntary Application Server Identification (VAPID) for Web Push §2. Application Server Self-Identification](https://datatracker.ietf.org/doc/html/rfc8292#section-2)
25
42
varexpiration:Int
26
43
44
+
/// The standard header including the type and algorithm.
45
+
///
46
+
/// - SeeAlso: [RFC 8292 Voluntary Application Server Identification (VAPID) for Web Push §2. Application Server Self-Identification](https://datatracker.ietf.org/doc/html/rfc8292#section-2)
0 commit comments