From 4dd2d7739695ef2247c6fd014684c9a599f55ede Mon Sep 17 00:00:00 2001 From: Johan Droz Date: Wed, 14 Mar 2018 21:28:34 +0100 Subject: [PATCH] Add template for full Keycloak REST API implementation --- authentication_management.go | 88 +++++++++++++++++++ ...test.go => client_attribute_certificate.go | 0 client_initial_access.go | 1 + client_registration_policy.go | 1 + client_role_mappings.go | 1 + client_templates.go | 1 + component.go | 1 + groups.go | 1 + identity_providers.go | 1 + key.go | 1 + realms_admin.go | 1 + role_mapper.go | 1 + roles.go | 1 + root.go | 1 + scope_mappings.go | 1 + user_storage_provider.go | 1 + user.go => users.go | 0 17 files changed, 102 insertions(+) create mode 100644 authentication_management.go rename user_test.go => client_attribute_certificate.go (100%) create mode 100644 client_initial_access.go create mode 100644 client_registration_policy.go create mode 100644 client_role_mappings.go create mode 100644 client_templates.go create mode 100644 component.go create mode 100644 groups.go create mode 100644 identity_providers.go create mode 100644 key.go create mode 100644 realms_admin.go create mode 100644 role_mapper.go create mode 100644 roles.go create mode 100644 root.go create mode 100644 scope_mappings.go create mode 100644 user_storage_provider.go rename user.go => users.go (100%) diff --git a/authentication_management.go b/authentication_management.go new file mode 100644 index 0000000..453bd41 --- /dev/null +++ b/authentication_management.go @@ -0,0 +1,88 @@ +package keycloak + +// Get authenticator providers Returns a list of authenticator providers. +// GET /{realm}/authentication/authenticator-providers + +// Get client authenticator providers Returns a list of client authenticator providers. +// GET /{realm}/authentication/client-authenticator-providers + +// Get authenticator provider’s configuration description +// GET /{realm}/authentication/config-description/{providerId} + +// Get authenticator configuration +// GET /{realm}/authentication/config/{id} + +// Update authenticator configuration +// PUT /{realm}/authentication/config/{id} + +// Delete authenticator configuration +// DELETE /{realm}/authentication/config/{id} + +// Add new authentication execution +// POST /{realm}/authentication/executions + +// Delete execution +// DELETE /{realm}/authentication/executions/{executionId} + +// Update execution with new configuration +// POST /{realm}/authentication/executions/{executionId}/config + +// Lower execution’s priority +// POST /{realm}/authentication/executions/{executionId}/lower-priority + +// Raise execution’s priority +// POST /{realm}/authentication/executions/{executionId}/raise-priority + +// Create a new authentication flow +// POST /{realm}/authentication/flows + +// Get authentication flows Returns a list of authentication flows. +// GET /{realm}/authentication/flows + +// Copy existing authentication flow under a new name The new name is given as 'newName' attribute of the passed JSON object +// POST /{realm}/authentication/flows/{flowAlias}/copy + +// Get authentication executions for a flow +// GET /{realm}/authentication/flows/{flowAlias}/executions + +// Update authentication executions of a flow +// PUT /{realm}/authentication/flows/{flowAlias}/executions + +// Add new authentication execution to a flow +// POST /{realm}/authentication/flows/{flowAlias}/executions/execution + +// Add new flow with new execution to existing flow +// POST /{realm}/authentication/flows/{flowAlias}/executions/flow + +// Get authentication flow for id +// GET /{realm}/authentication/flows/{id} + +// Delete an authentication flow +// DELETE /{realm}/authentication/flows/{id} + +// Get form action providers Returns a list of form action providers. +// GET /{realm}/authentication/form-action-providers + +// Get form providers Returns a list of form providers. +// GET /{realm}/authentication/form-providers + +// Get configuration descriptions for all clients +// GET /{realm}/authentication/per-client-config-description + +// Register a new required actions +// POST /{realm}/authentication/register-required-action + +// Get required actions Returns a list of required actions. +// GET /{realm}/authentication/required-actions + +// Get required action for alias +// GET /{realm}/authentication/required-actions/{alias} + +// Update required action +// PUT /{realm}/authentication/required-actions/{alias} + +// Delete required action +// DELETE /{realm}/authentication/required-actions/{alias} + +// Get unregistered required actions Returns a list of unregistered required actions. +// GET /{realm}/authentication/unregistered-required-actions diff --git a/user_test.go b/client_attribute_certificate.go similarity index 100% rename from user_test.go rename to client_attribute_certificate.go diff --git a/client_initial_access.go b/client_initial_access.go new file mode 100644 index 0000000..cf172a0 --- /dev/null +++ b/client_initial_access.go @@ -0,0 +1 @@ +package keycloak diff --git a/client_registration_policy.go b/client_registration_policy.go new file mode 100644 index 0000000..cf172a0 --- /dev/null +++ b/client_registration_policy.go @@ -0,0 +1 @@ +package keycloak diff --git a/client_role_mappings.go b/client_role_mappings.go new file mode 100644 index 0000000..cf172a0 --- /dev/null +++ b/client_role_mappings.go @@ -0,0 +1 @@ +package keycloak diff --git a/client_templates.go b/client_templates.go new file mode 100644 index 0000000..cf172a0 --- /dev/null +++ b/client_templates.go @@ -0,0 +1 @@ +package keycloak diff --git a/component.go b/component.go new file mode 100644 index 0000000..cf172a0 --- /dev/null +++ b/component.go @@ -0,0 +1 @@ +package keycloak diff --git a/groups.go b/groups.go new file mode 100644 index 0000000..cf172a0 --- /dev/null +++ b/groups.go @@ -0,0 +1 @@ +package keycloak diff --git a/identity_providers.go b/identity_providers.go new file mode 100644 index 0000000..cf172a0 --- /dev/null +++ b/identity_providers.go @@ -0,0 +1 @@ +package keycloak diff --git a/key.go b/key.go new file mode 100644 index 0000000..cf172a0 --- /dev/null +++ b/key.go @@ -0,0 +1 @@ +package keycloak diff --git a/realms_admin.go b/realms_admin.go new file mode 100644 index 0000000..cf172a0 --- /dev/null +++ b/realms_admin.go @@ -0,0 +1 @@ +package keycloak diff --git a/role_mapper.go b/role_mapper.go new file mode 100644 index 0000000..cf172a0 --- /dev/null +++ b/role_mapper.go @@ -0,0 +1 @@ +package keycloak diff --git a/roles.go b/roles.go new file mode 100644 index 0000000..cf172a0 --- /dev/null +++ b/roles.go @@ -0,0 +1 @@ +package keycloak diff --git a/root.go b/root.go new file mode 100644 index 0000000..cf172a0 --- /dev/null +++ b/root.go @@ -0,0 +1 @@ +package keycloak diff --git a/scope_mappings.go b/scope_mappings.go new file mode 100644 index 0000000..cf172a0 --- /dev/null +++ b/scope_mappings.go @@ -0,0 +1 @@ +package keycloak diff --git a/user_storage_provider.go b/user_storage_provider.go new file mode 100644 index 0000000..cf172a0 --- /dev/null +++ b/user_storage_provider.go @@ -0,0 +1 @@ +package keycloak diff --git a/user.go b/users.go similarity index 100% rename from user.go rename to users.go