With the Django OAuth Toolkit, Ion supports accessing API and other resources via OAuth2. This allows for applications to be written using the Ion API without the need to prompt for user credentials from within the application. Instead, access tokens are used to gain access to Ion API resources.
For more details on OAuth, please refer to https://oauth.net.
Note: All of the examples on the page are targeted towards web applications. They will not work for the purposes of, for example, allowing a program running on your computer to access the Ion API.
Register an application¶
Go to https://ion.tjhsst.edu/oauth/applications/ and log in to create and register a client application. Specify the following values in the form, as prompted:
Some descriptive name for your application.
- Client Type*
Choose “Confidential” if your app has a backend component and your server can store the client ID and secret securely
Choose “Public” if your app is purely client-side and a copy of the credentials will be distributed publicly
- Authorization Grant Type*
Choose “Authorization code” if your client type is “Confidential”
Choose “Implicit” if your client type is “Public” (for example, on a native application)
- Redirect URIs
Enter one or more URLs that your application will redirect back to after the authorization is completed.
Store the Client ID and Client Secret tokens for use with your application.