<aside> 🧭

</aside>

User Guides

Connecting MCP Client to Cashmere MCP Server

How to access Wiley Content in Perplexity

How to get a Content License

Publisher Guides

Creating Omnipub Collections

Preparing Structured Data for Ingestion

Types of License Rights

Uploading New Content via the website

Developer Guides

API Docs

Cashmere Link Guide (OAuth) Overview

Third-Party OAuth Integration Guide for Publishers (BYOL / Short Link)

Connecting Wiley with Perplexity | DEPRECATED

Cashmere MCP Tools

Overview

This guide is for publishers who want to allow users to access their content on Cashmere that has already been licensed on the publishers platform. We refer to this setup as Bring Your Own License (BYOL) and Short Link.

This image visualizes the flow of how your integration would work. In the first Image, Cashmere Link notifies the user that a 3rd party is facilitating the connection. The second and third images are intended to represent your auth flow. In the last image, when the token and the scopes have been returned to Cashmere, we present it back to the user and confirm the authentication process.

This image visualizes the flow of how your integration would work. In the first Image, Cashmere Link notifies the user that a 3rd party is facilitating the connection. The second and third images are intended to represent your auth flow. In the last image, when the token and the scopes have been returned to Cashmere, we present it back to the user and confirm the authentication process.

What This Integration Provides

Your Role as Publisher

As a third-party publisher, you will:

  1. Configure your OAuth provider with specific requirements
  2. Implement custom OAuth claims to communicate collection access rights
  3. Provide configuration details to Cashmere for integration
  4. Test the integration before going live

Step 1: OAuth Provider Configuration

1.1 Create OAuth Application

In your OAuth provider (Auth0, Okta, custom implementation, etc.), create a new web application with these specifications:

Required Settings:

Required Scopes:

Your OAuth application must support these scopes:

1.2 Configure Redirect URI

Set your OAuth application's redirect URI to:

<https://cashmere.io/publisher_oauth/callback>

Important: The redirect URI must match exactly. Contact Cashmere if you need a different domain or custom redirect URL.

1.3 Note Your OAuth Endpoints

You'll need to provide these details to Cashmere:

Step 2: Implement Custom Claims

2.1 Collection IDs Claim

The most critical part of the integration is implementing the https://cashmere.io/collection_ids custom claim. This claim tells Cashmere which content collections a user has access to. Cashmere validates passed collection ids to ensure you are the owner of them.

Claim Requirements:

Implementation Examples:

Auth0 Post Login Trigger:

exports.onExecutePostLogin = async (event, api) => {
  if (event.transaction?.requested_scopes?.includes("<https://cashmere.io/collection_ids>")) {
    // Determine user's collection access based on your business logic
    const userCollections = getUserCollections(event.user.user_id);
    api.idToken.setCustomClaim(
      "<https://cashmere.io/collection_ids>",
      userCollections.join(',')  // eg "1,2,3"
    );
  }
};

2.2 Business Logic for Collection Access

You need to implement logic to determine which collections a user can access. This typically involves:

It also might be as simple as a hard-coded list if you are granting all of your users access to a set list of collections.

Example Business Logic:

function getUserCollections(userId) {
  const user = getUserFromDatabase(userId);
  const collections = [];

  // Add collections based on subscription tier
  if (user.subscription === 'premium') {
    collections.push(1, 2, 3, 4, 5); // Premium collections
  } else if (user.subscription === 'basic') {
    collections.push(1, 2); // Basic collections only
  }

  // Add organization-specific collections
  if (user.organization === 'university_a') {
    collections.push(10, 11, 12); // University A collections
  }

  return collections;
}

2.3 Access Updates

Your implementation should support dynamic access changes. Cashmere will update the collections list via an OAuth token refresh after each API Token each time it is used.

Step 3: Coordinate with Cashmere

3.1 Information to Provide

Contact Cashmere with the following information:

OAuth Configuration:

You will receive a unique identifier which you will be able to test the connection with via

https://cashmere.io/publisher_oauth/<publisher_provider_uuid>

Step 4: Testing Your OAuth Provider Setup

image.png

4.1 OAuth Flow Testing

  1. Authorization Flow: Verify users can authenticate successfully
  2. Token Exchange: Confirm authorization codes exchange for valid tokens