import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
keycloak: {
type: "app",
app: "keycloak",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.keycloak.$auth.url}/admin/realms`,
headers: {
Authorization: `Bearer ${this.keycloak.$auth.oauth_access_token}`,
},
})
},
})
Emit new event when a new event is created. See the documentation
Create a new user in Keycloak. The username must be unique. See the documentation
Keycloak uses OAuth authentication. When you connect your Keycloak account, Pipedream will open a popup window where you can sign into Keycloak and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Keycloak API.
Pipedream requests the following authorization scopes when you connect your account:
POST
{{custom_fields.url}}/realms/master/protocol/openid-connect/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.client_id}}
&
client_secret={{custom_fields.client_secret}}
&
grant_type=client_credentials
POST
{{custom_fields.url}}/realms/master/protocol/openid-connect/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.client_id}}
&
client_secret={{custom_fields.client_secret}}
&
grant_type=client_credentials