android-components / mozilla.components.concept.engine.webpush / WebPushSubscription

WebPushSubscription

data class WebPushSubscription (source)

A data class representation of the PushSubscription web specification.

Parameters

scope - The subscription identifier which usually represents the website’s URI.

endpoint - The Web Push endpoint for this subscription. This is the URL of a web service which implements the Web Push protocol.

appServerKey - A public key a server will use to send messages to client apps via a push server.

publicKey - The public key generated, to be provided to the app server for message encryption.

authSecret - A secret key generated, to be provided to the app server for use in encrypting and authenticating messages sent to the endpoint.

Constructors

Name Summary
<init> WebPushSubscription(scope: String, endpoint: String, appServerKey: ByteArray?, publicKey: ByteArray, authSecret: ByteArray)
A data class representation of the PushSubscription web specification.

Properties

Name Summary
appServerKey val appServerKey: ByteArray?
A public key a server will use to send messages to client apps via a push server.
authSecret val authSecret: ByteArray
A secret key generated, to be provided to the app server for use in encrypting and authenticating messages sent to the endpoint.
endpoint val endpoint: String
The Web Push endpoint for this subscription. This is the URL of a web service which implements the Web Push protocol.
publicKey val publicKey: ByteArray
The public key generated, to be provided to the app server for message encryption.
scope val scope: String
The subscription identifier which usually represents the website’s URI.

Functions

Name Summary
equals fun equals(other: Any?): Boolean
hashCode fun hashCode(): Int

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.