Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ubrt/keycloak-postman
A keycloak collection and environment to use the keycloak api
https://github.com/ubrt/keycloak-postman
administration keycloak postman rest-api
Last synced: 29 days ago
JSON representation
A keycloak collection and environment to use the keycloak api
- Host: GitHub
- URL: https://github.com/ubrt/keycloak-postman
- Owner: ubrt
- License: mit
- Created: 2024-12-08T15:41:35.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-12-08T16:14:43.000Z (about 1 month ago)
- Last Synced: 2024-12-08T16:28:34.848Z (about 1 month ago)
- Topics: administration, keycloak, postman, rest-api
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Keycloak Postman Collection
This Postman collection was generated using the official OpenAPI endpoint: [Keycloak REST API OpenAPI Specification](https://www.keycloak.org/docs-api/latest/rest-api/openapi.json).
---
## Keycloak Setup
1. **Create a Client**:
- In Keycloak, create a new client that supports service account roles.
2. **Assign Admin Roles**:
- Map the necessary admin roles to this client.
3. **Retrieve Credentials**:
- Copy the `clientId` and `clientSecret` for use in the Postman environment.## Postman Setup
1. **Import Collection and Environment**:
- Import the provided Postman collection and example environment. Alternatively, create a custom environment.
2. **Configure Environment**:
- Set up the environment variables for your Keycloak instance (e.g., base URL, client ID, and secret).
3. **Token Management**:
- Leave `token` and `token_expiry` unchanged; these will be automatically managed by the pre-request script.
## Using the Collection
- **Path Variables**:
- Some requests require additional path parameters to be set in the "Params" tab under "Path Variables."
- The `realm` parameter will be populated automatically using the environment settings.## Pre-request Script
The pre-request script:
1. Checks if a valid token exists in the environment.
2. If not, it requests a new token using the `client_credentials` grant type.
3. Saves the new token and its expiry time in the environment variables.