fastify-passkit-webservice
v1.4.4
Published
Fastify integration of Apple Wallet web services
Downloads
280
Maintainers
Readme
Fastify Passkit WebService
Integrate Apple Wallet Web services in your current fastify integration.
Architecture
Fastify Passkit Webservice, as the name says, wraps Apple Wallet specifications into a Fastify integration.
It exposes a set of plugins that will let yourself to dedicate exclusively to the integration of the business logic.
Each plugin represents a subscription to an endpoint defined in Apple Wallet Developer Documentation.
Everything is designed to provide a good developer esperience. It is fully compatible with Typescript.
This package is an integration of passkit-webservice-toolkit. Visit it for other integrations.
Installation
$ npm install fastify-passkit-webserviceAPI Documentation
All the details are available in the dedicated project wiki page.
Usage example
All the exposed middlewares work like this:
import Fastify from "fastify";
const app = Fastify();
app.register(import("fastify-passkit-webservice/v1/registration.js"), {
async onRegister(
deviceLibraryIdentifier,
passTypeIdentifier,
serialNumber,
pushToken,
) {
/** your implementation */
},
async onUnregister(
deviceLibraryIdentifier,
passTypeIdentifier,
serialNumber,
) {
/** your implementation */
},
async tokenVerifier(token) {
/** your implementation */
},
});Give a look at specs/server.mjs for fully example.
