Use Cases
OAuth 2.0 enables you to:- Build applications that authenticate users with their PERSCOM credentials
- Access the PERSCOM API on behalf of users
- Create single sign-on (SSO) experiences across your services
- Integrate PERSCOM with third-party platforms
Client Types
PERSCOM supports four OAuth 2.0 grant types. Select the type that matches your application:| Type | Use case |
|---|---|
| Regular Web Application | Server-side applications where users are redirected to authorize access. Uses the authorization code grant. |
| Single Page / Native Application | Client-side applications like SPAs or mobile apps. Uses the implicit grant. |
| Machine-to-Machine | Server applications that access resources without user involvement. Uses the client credentials grant. |
| Resource Owner | Trusted applications where users provide credentials directly. Uses the password grant. |
Create An OAuth Client
- In the sidebar, select Integrations > Clients.
- Select New client.
- Enter a Name to identify the client.
- Select the Type that matches your application.
- For web applications, enter the Redirect URL where users return after authorization.
- (Optional) Enter a Description for the client.
- Configure Scopes to limit what data the client can access, or select All scopes for full access.
- Select Create.
Important: Keep your client secret confidential. Never expose it in client-side code or public repositories.
Endpoints
After creating a client, view the Endpoints tab to find the URLs for your integration:| Endpoint | Description |
|---|---|
| Discovery Endpoint | OpenID Connect discovery document with configuration details |
| Authorization Endpoint | Redirect users here to begin the authorization flow |
| Token Endpoint | Exchange authorization codes for access tokens |
| Logout Endpoint | End user sessions |
| User Info Endpoint | Retrieve authenticated user information |
Authorization Code Flow
For server-side web applications, use the authorization code flow:- Redirect users to the Authorization Endpoint with your client ID, redirect URI, and requested scopes.
- Users authenticate with PERSCOM and approve access.
- PERSCOM redirects users back to your redirect URI with an authorization code.
- Exchange the authorization code for an access token at the Token Endpoint.
- Use the access token to make API requests on behalf of the user.
Scopes
Scopes limit what data and actions a client can access. When creating a client, you can select specific scopes or grant access to all scopes. Common scopes include:view:users- Read user datacreate:users- Create new usersupdate:users- Modify user datadelete:users- Remove users
Revoke Access
To revoke a client’s access:- In the sidebar, select Integrations > Clients.
- Find the client and toggle the Revoked switch.