The Aspen Discovery WordPress plugin helps your website connect to an Aspen Discovery instance and show live content from it inside WordPress.
It can be used to:
- show public information such as lists, events, and library data
- let patrons log in to their Aspen account
- display patron-specific data after login
- protect sections of content so only logged-in users can view them
Once connected to your Aspen Discovery instance, the plugin can:
- make authenticated or public API requests to Aspen
- create login and logout links for patrons
- handle the OAuth callback needed for login
- display custom data using shortcodes
- restrict content to logged-in patrons
Before installing the plugin, make sure you have:
- a WordPress site
- an Aspen Discovery instance or API service
- the correct OAuth client credentials from Aspen
- permission to add plugins and manage WordPress settings
- Upload the plugin ZIP file to WordPress.
- Activate the plugin from the WordPress admin Plugins page.
- Go to the plugin settings area in the WordPress admin.
If your site uses a development or staging environment, make sure the correct Aspen API URLs and credentials are configured there before using the plugin on production.
In the plugin settings screen, save the credentials for your Aspen Discovery OAuth clients.
You will typically set up two types of credentials:
- Client Credentials: used for public or general data access
- Authorization Code: used for patron login and patron-specific content
Use these when you want to show public information that does not require a logged-in patron.
Examples:
- public lists
- events
- library information
- general Aspen Discovery content
Use these when you want patrons to log in and access their own account information or restricted content.
Examples:
- patron profile
- account summary
- private content behind login
When Authorization Code credentials are saved, the plugin can generate the URLs needed to start login, complete the OAuth process, and log users out.
The plugin can provide public links such as:
- login start URL
- callback URL
- logout URL
Typical examples:
- login:
/?aspen_discovery_oauth=login - callback:
/?aspen_discovery_oauth=callback - logout:
/?aspen_discovery_oauth=logout
These are useful in menus, buttons, custom links, or other WordPress content.
You can protect content so it only appears when a patron is logged in.
Example:
[aspen_discovery_protected]
Welcome back.
[aspen_discovery_demo api="User" method="getPatronProfile" client_type="authorization_code"]
[/aspen_discovery_protected]
What this does:
- if the user is logged in, the protected content is shown
- if the user is not logged in, a login prompt appears instead
- the protected section can be used for account pages or member-only content
The plugin includes shortcodes that let you display Aspen data directly in WordPress pages and posts.
These use the client credentials flow and do not require a patron login.
Use them for:
- library information
- lists
- events
- other public content from Aspen
These use the authorization code client and require the patron to be logged in.
Use them for:
- patron profile
- account summary
- personalized items and data
If the user is not authenticated, the plugin can automatically prompt them to log in.
This plugin is most useful for websites that want to:
- connect WordPress to an Aspen Discovery instance
- show live library information in site pages
- give patrons access to personal account details
- keep some content visible only to logged-in users
If the plugin is not working as expected, check the following:
- your Aspen OAuth client ID and secret are correct
- the correct OAuth scopes are saved
- the callback URL matches the one configured in Aspen
- your site is using the correct Aspen environment (test or live)
- your patron login flow has been tested in a browser
If a shortcode does not show data, verify whether it needs public credentials or patron credentials.