Liking cljdoc? Tell your friends :D

wagoe.push.shell.service


callback-tokenclj

(callback-token callback-secret fields)

A token valid for one push to one device until :expires-at, in epoch seconds: fields are :callback-id, :notification-id, :device-token, :platform and :expires-at (BOU-849).

A token valid for one push to one device until `:expires-at`, in epoch
seconds: `fields` are `:callback-id`, `:notification-id`, `:device-token`,
`:platform` and `:expires-at` (BOU-849).
sourceraw docstring

callback-verdictclj

(callback-verdict callback-secret payload now)
(callback-verdict callback-secret
                  {:keys [provider-message-id callback-token] :as payload}
                  now
                  {:keys [refuse-legacy?]})

:bound for a callback whose token names its notification, device and platform and has not expired at now (epoch seconds), :legacy for a generate-callback-token token unless :refuse-legacy?, nil for anything else, and for everything without a secret: an empty HMAC key throws.

`:bound` for a callback whose token names its notification, device and
platform and has not expired at `now` (epoch seconds), `:legacy` for a
`generate-callback-token` token unless `:refuse-legacy?`, nil for anything
else, and for everything without a secret: an empty HMAC key throws.
sourceraw docstring

deliver-each!clj

(deliver-each! {:keys [fcm-provider apns-provider]} platform sends)

Internal: each [device-token notification] sent on platform, concurrently where the provider implements IPerDeviceSend. Per-token results, in order.

Internal: each `[device-token notification]` sent on `platform`, concurrently
where the provider implements `IPerDeviceSend`. Per-token results, in order.
sourceraw docstring

deliver-to-platform!clj

(deliver-to-platform! {:keys [fcm-provider apns-provider]}
                      platform
                      notification
                      devices)

Internal: send notification to devices on a specific platform. Returns vector of results, or empty vector if no devices.

Internal: send notification to devices on a specific platform.
Returns vector of results, or empty vector if no devices.
sourceraw docstring

generate-callback-tokencljdeprecated

(generate-callback-token callback-secret provider-message-id)

Deprecated, goes in 2.0: the token covers the id alone, so it verifies for any notification and device and never expires. Use callback-token.

Deprecated, goes in 2.0: the token covers the id alone, so it verifies for
any notification and device and never expires. Use `callback-token`.
sourceraw docstring

verify-callback-tokencljdeprecated

(verify-callback-token callback-secret provider-message-id callback-token)

Deprecated, goes in 2.0: checks only a generate-callback-token token. Use callback-verdict.

Deprecated, goes in 2.0: checks only a `generate-callback-token` token.
Use `callback-verdict`.
sourceraw docstring

with-callbackclj

(with-callback notification notification-id callback-secret)
(with-callback notification notification-id callback-secret device)
(with-callback notification
               notification-id
               callback-secret
               {:keys [token platform]}
               ttl-seconds)

The notification with what device posts back to /push/callback: a minted id, and a token for this notification on this device that expires. The provider's message id arrives only after the send, so the id is minted here. The token verifies for ttl-seconds, seven days when nil. Unchanged without a secret: no token could verify.

Without device, deprecated: one id and a token over it alone, which goes in 2.0.

The notification with what `device` posts back to `/push/callback`: a
minted id, and a token for this notification on this device that expires.
The provider's message id arrives only after the send, so the id is minted
here. The token verifies for `ttl-seconds`, seven days when nil. Unchanged
without a secret: no token could verify.

Without `device`, deprecated: one id and a token over it alone, which goes
in 2.0.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close