Editions
Richie Editions App SDKs
Developer guide for app makers
The Richie Editions reader is available as a native SDK, ready to integrate into any iOS or Android app.
The easiest way to get started is to clone one of our demo apps from GitHub. See below for platform-specific instructions.
iOS
Fetch the demo app from the richiefi/editions-sdk-example-ios repository at GitHub and follow the instructions in README.md
to build and run it. An API reference is also available.
Android
Fetch the demo app from the richiefi/editions-sdk-example-android repository at GitHub and follow the instructions in README.md
to build and run it. An API reference is also available.
fi.richie:richiesdk
is the recommended artifact for including the Android SDKs. It contains all Richie SDKs, i.e. Ads, Editions, and Books. If you only need Editions in your app, you can exclude Books:
implementation('fi.richie:richiesdk:yyyymm.xx') {
exclude group: 'fi.richie', module: 'booklibraryui'
}
Authentication and Entitlements
Customers in the Richie Editions systems are authorized using a JSON Web Token (JWT). Typically, the app will receive the JWT from the publisher's backend system based on the customer's login credentials. The JWT is then passed to the SDK by implementing a TokenProvider
that gets called by the SDK when a token is needed to complete an action the customer initiated. The demo apps include an example implementation of a TokenProvider
that uses a hard-coded JWT that allows access to limited demo content.
In a production system, the JSON payload would use the following format:
The iat
and exp
fields are the standard JWT fields for the issued at and expiration times. The Richie Editions backend will verify that the token is valid for the current time. The ent
field is an array of entitlements that the customer has. Each entitlement maps to one or more Richie Editions products. Multiple entitlements can map to the same product, and a single entitlement can map to multiple products. Richie maintains the entitlement-to-product mapping in the backend configuration.
The tokens are signed by the publisher with the ES256
or ES384
signature algorithm. The public key will be configured in the Richie Editions backend.