From 35d0f71abb5695d009fead9a635031f02f93d573 Mon Sep 17 00:00:00 2001 From: Alexander Korolev Date: Wed, 19 Jun 2024 23:37:52 +0200 Subject: [PATCH] Keycloak Admin REST API v25.0.0 (#123) --- Cargo.toml | 2 +- README.md | 4 +- api/openapi.json | 538 +++++++++++++++---- examples/openapi.patch.toml | 3 - src/lib.rs | 4 +- src/rest/generated_rest.rs | 1010 +++++++++++++++++++++-------------- src/types.rs | 95 +++- 7 files changed, 1142 insertions(+), 514 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 704cba1..ca113fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "keycloak" -version = "24.0.301" +version = "25.0.0" authors = ["Alexander Korolev "] edition = "2021" categories = ["api-bindings", "asynchronous"] diff --git a/README.md b/README.md index acf4954..3737e64 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Dual-licensed under `MIT` or the [UNLICENSE](http://unlicense.org/). ## Features -Implements [Keycloak Admin REST API version 24.0.3](https://www.keycloak.org/docs-api/24.0.3/rest-api/index.html). +Implements [Keycloak Admin REST API version 25.0.0](https://www.keycloak.org/docs-api/25.0.0/rest-api/index.html). ### Feature flags @@ -24,7 +24,7 @@ Add dependency to Cargo.toml: ```toml [dependencies] -keycloak = "24.0" +keycloak = "25.0" ``` ```rust diff --git a/api/openapi.json b/api/openapi.json index 276392d..a96fac1 100644 --- a/api/openapi.json +++ b/api/openapi.json @@ -414,8 +414,8 @@ } }, "responses" : { - "200" : { - "description" : "OK" + "201" : { + "description" : "Created" } }, "deprecated" : true @@ -560,8 +560,8 @@ } }, "responses" : { - "200" : { - "description" : "OK" + "201" : { + "description" : "Created" } } }, @@ -589,7 +589,14 @@ } ], "responses" : { "200" : { - "description" : "OK" + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AuthenticationExecutionRepresentation" + } + } + } } } }, @@ -644,8 +651,8 @@ } }, "responses" : { - "200" : { - "description" : "OK" + "201" : { + "description" : "Created" } } }, @@ -795,8 +802,8 @@ } }, "responses" : { - "200" : { - "description" : "OK" + "201" : { + "description" : "Created" } } }, @@ -836,8 +843,8 @@ } }, "responses" : { - "200" : { - "description" : "OK" + "201" : { + "description" : "Created" } } }, @@ -866,7 +873,17 @@ } ], "responses" : { "200" : { - "description" : "OK" + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AuthenticationExecutionInfoRepresentation" + } + } + } + } } } }, @@ -892,8 +909,8 @@ } }, "responses" : { - "200" : { - "description" : "OK" + "204" : { + "description" : "No Content" } } }, @@ -925,16 +942,14 @@ "application/json" : { "schema" : { "type" : "object", - "additionalProperties" : { - "type" : "string" - } + "additionalProperties" : { } } } } }, "responses" : { - "200" : { - "description" : "OK" + "201" : { + "description" : "Created" } } }, @@ -966,16 +981,14 @@ "application/json" : { "schema" : { "type" : "object", - "additionalProperties" : { - "type" : "string" - } + "additionalProperties" : { } } } } }, "responses" : { - "200" : { - "description" : "OK" + "201" : { + "description" : "Created" } } }, @@ -1036,8 +1049,8 @@ } }, "responses" : { - "200" : { - "description" : "OK" + "204" : { + "description" : "No Content" } } }, @@ -1307,6 +1320,123 @@ } } ] }, + "/admin/realms/{realm}/authentication/required-actions/{alias}/config" : { + "get" : { + "tags" : [ "Authentication Management" ], + "summary" : "Get RequiredAction configuration", + "parameters" : [ { + "name" : "alias", + "in" : "path", + "description" : "Alias of required action", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RequiredActionConfigRepresentation" + } + } + } + } + } + }, + "put" : { + "tags" : [ "Authentication Management" ], + "summary" : "Update RequiredAction configuration", + "parameters" : [ { + "name" : "alias", + "in" : "path", + "description" : "Alias of required action", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RequiredActionConfigRepresentation" + } + } + } + }, + "responses" : { + "204" : { + "description" : "No Content" + } + } + }, + "delete" : { + "tags" : [ "Authentication Management" ], + "summary" : "Delete RequiredAction configuration", + "parameters" : [ { + "name" : "alias", + "in" : "path", + "description" : "Alias of required action", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "204" : { + "description" : "No Content" + } + } + }, + "parameters" : [ { + "name" : "realm", + "in" : "path", + "description" : "realm name (not id!)", + "required" : true, + "schema" : { + "type" : "string" + } + } ] + }, + "/admin/realms/{realm}/authentication/required-actions/{alias}/config-description" : { + "get" : { + "tags" : [ "Authentication Management" ], + "summary" : "Get RequiredAction provider configuration description", + "parameters" : [ { + "name" : "alias", + "in" : "path", + "description" : "Alias of required action", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RequiredActionConfigInfoRepresentation" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "realm", + "in" : "path", + "description" : "realm name (not id!)", + "required" : true, + "schema" : { + "type" : "string" + } + } ] + }, "/admin/realms/{realm}/authentication/required-actions/{alias}/lower-priority" : { "post" : { "tags" : [ "Authentication Management" ], @@ -1447,6 +1577,13 @@ "/admin/realms/{realm}/client-policies/policies" : { "get" : { "tags" : [ "Realms Admin" ], + "parameters" : [ { + "name" : "include-global-policies", + "in" : "query", + "schema" : { + "type" : "boolean" + } + } ], "responses" : { "200" : { "description" : "OK", @@ -3035,6 +3172,53 @@ } } ] }, + "/admin/realms/{realm}/client-types" : { + "get" : { + "tags" : [ "Realms Admin" ], + "summary" : "List all client types available in the current realm", + "description" : "This endpoint returns a list of both global and realm level client types and the attributes they set", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ClientTypesRepresentation" + } + } + } + } + } + }, + "put" : { + "tags" : [ "Realms Admin" ], + "summary" : "Update a client type", + "description" : "This endpoint allows you to update a realm level client type", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ClientTypesRepresentation" + } + } + } + }, + "responses" : { + "204" : { + "description" : "No Content" + } + } + }, + "parameters" : [ { + "name" : "realm", + "in" : "path", + "description" : "realm name (not id!)", + "required" : true, + "schema" : { + "type" : "string" + } + } ] + }, "/admin/realms/{realm}/clients" : { "get" : { "tags" : [ "Clients" ], @@ -8129,10 +8313,8 @@ "in" : "path", "required" : true, "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PathSegment" - } + "pattern" : ".*", + "type" : "string" } } ], "responses" : { @@ -8366,13 +8548,22 @@ "parameters" : [ { "name" : "briefRepresentation", "in" : "query", + "description" : "Boolean which defines whether brief groups representations are returned or not (default: false)", "schema" : { "default" : "false", "type" : "boolean" } + }, { + "name" : "exact", + "in" : "query", + "description" : "Boolean which defines whether the params \"search\" must match exactly or not", + "schema" : { + "type" : "boolean" + } }, { "name" : "first", "in" : "query", + "description" : "The position of the first result to be returned (pagination offset).", "schema" : { "format" : "int32", "default" : "0", @@ -8381,11 +8572,19 @@ }, { "name" : "max", "in" : "query", + "description" : "The maximum number of results that are to be returned. Defaults to 10", "schema" : { "format" : "int32", "default" : "10", "type" : "integer" } + }, { + "name" : "search", + "in" : "query", + "description" : "A String representing either an exact group name or a partial name", + "schema" : { + "type" : "string" + } } ], "responses" : { "200" : { @@ -8593,10 +8792,10 @@ } } ] }, - "/admin/realms/{realm}/groups/{group-id}/role-mappings/clients/{client}" : { + "/admin/realms/{realm}/groups/{group-id}/role-mappings/clients/{client-id}" : { "get" : { "tags" : [ "Client Role Mappings" ], - "summary" : "Get client-level role mappings for the user, and the app", + "summary" : "Get client-level role mappings for the user or group, and the app", "responses" : { "200" : { "description" : "OK", @@ -8615,7 +8814,7 @@ }, "post" : { "tags" : [ "Client Role Mappings" ], - "summary" : "Add client-level roles to the user role mapping", + "summary" : "Add client-level roles to the user or group role mapping", "requestBody" : { "content" : { "application/json" : { @@ -8636,7 +8835,7 @@ }, "delete" : { "tags" : [ "Client Role Mappings" ], - "summary" : "Delete client-level roles from user role mapping", + "summary" : "Delete client-level roles from user or group role mapping", "requestBody" : { "content" : { "application/json" : { @@ -8671,18 +8870,19 @@ "type" : "string" } }, { - "name" : "client", + "name" : "client-id", "in" : "path", + "description" : "client id (not clientId!)", "required" : true, "schema" : { "type" : "string" } } ] }, - "/admin/realms/{realm}/groups/{group-id}/role-mappings/clients/{client}/available" : { + "/admin/realms/{realm}/groups/{group-id}/role-mappings/clients/{client-id}/available" : { "get" : { "tags" : [ "Client Role Mappings" ], - "summary" : "Get available client-level roles that can be mapped to the user", + "summary" : "Get available client-level roles that can be mapped to the user or group", "responses" : { "200" : { "description" : "OK", @@ -8715,15 +8915,16 @@ "type" : "string" } }, { - "name" : "client", + "name" : "client-id", "in" : "path", + "description" : "client id (not clientId!)", "required" : true, "schema" : { "type" : "string" } } ] }, - "/admin/realms/{realm}/groups/{group-id}/role-mappings/clients/{client}/composite" : { + "/admin/realms/{realm}/groups/{group-id}/role-mappings/clients/{client-id}/composite" : { "get" : { "tags" : [ "Client Role Mappings" ], "summary" : "Get effective client-level role mappings This recurses any composite roles", @@ -8768,8 +8969,9 @@ "type" : "string" } }, { - "name" : "client", + "name" : "client-id", "in" : "path", + "description" : "client id (not clientId!)", "required" : true, "schema" : { "type" : "string" @@ -12086,10 +12288,10 @@ } } ] }, - "/admin/realms/{realm}/users/{user-id}/role-mappings/clients/{client}" : { + "/admin/realms/{realm}/users/{user-id}/role-mappings/clients/{client-id}" : { "get" : { "tags" : [ "Client Role Mappings" ], - "summary" : "Get client-level role mappings for the user, and the app", + "summary" : "Get client-level role mappings for the user or group, and the app", "responses" : { "200" : { "description" : "OK", @@ -12108,7 +12310,7 @@ }, "post" : { "tags" : [ "Client Role Mappings" ], - "summary" : "Add client-level roles to the user role mapping", + "summary" : "Add client-level roles to the user or group role mapping", "requestBody" : { "content" : { "application/json" : { @@ -12129,7 +12331,7 @@ }, "delete" : { "tags" : [ "Client Role Mappings" ], - "summary" : "Delete client-level roles from user role mapping", + "summary" : "Delete client-level roles from user or group role mapping", "requestBody" : { "content" : { "application/json" : { @@ -12164,18 +12366,19 @@ "type" : "string" } }, { - "name" : "client", + "name" : "client-id", "in" : "path", + "description" : "client id (not clientId!)", "required" : true, "schema" : { "type" : "string" } } ] }, - "/admin/realms/{realm}/users/{user-id}/role-mappings/clients/{client}/available" : { + "/admin/realms/{realm}/users/{user-id}/role-mappings/clients/{client-id}/available" : { "get" : { "tags" : [ "Client Role Mappings" ], - "summary" : "Get available client-level roles that can be mapped to the user", + "summary" : "Get available client-level roles that can be mapped to the user or group", "responses" : { "200" : { "description" : "OK", @@ -12208,15 +12411,16 @@ "type" : "string" } }, { - "name" : "client", + "name" : "client-id", "in" : "path", + "description" : "client id (not clientId!)", "required" : true, "schema" : { "type" : "string" } } ] }, - "/admin/realms/{realm}/users/{user-id}/role-mappings/clients/{client}/composite" : { + "/admin/realms/{realm}/users/{user-id}/role-mappings/clients/{client-id}/composite" : { "get" : { "tags" : [ "Client Role Mappings" ], "summary" : "Get effective client-level role mappings This recurses any composite roles", @@ -12261,8 +12465,9 @@ "type" : "string" } }, { - "name" : "client", + "name" : "client-id", "in" : "path", + "description" : "client id (not clientId!)", "required" : true, "schema" : { "type" : "string" @@ -12518,6 +12723,45 @@ "type" : "string" } } ] + }, + "/admin/realms/{realm}/users/{user-id}/unmanagedAttributes" : { + "get" : { + "tags" : [ "Users" ], + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "array", + "items" : { + "type" : "string" + } + } + } + } + } + } + } + }, + "parameters" : [ { + "name" : "realm", + "in" : "path", + "description" : "realm name (not id!)", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "user-id", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ] } }, "components" : { @@ -12639,7 +12883,7 @@ "format" : "int64", "type" : "integer" }, - "session_state" : { + "sid" : { "type" : "string" }, "at_hash" : { @@ -12715,15 +12959,6 @@ "s_hash" : { "type" : "string" }, - "authTime" : { - "format" : "int32", - "type" : "integer", - "writeOnly" : true, - "deprecated" : true - }, - "sid" : { - "type" : "string" - }, "trusted-certs" : { "uniqueItems" : true, "type" : "array", @@ -12824,6 +13059,9 @@ "description" : { "type" : "string" }, + "type" : { + "type" : "string" + }, "rootUrl" : { "type" : "string" }, @@ -13087,6 +13325,10 @@ "index" : { "format" : "int32", "type" : "integer" + }, + "priority" : { + "format" : "int32", + "type" : "integer" } } }, @@ -13318,6 +13560,12 @@ "items" : { "$ref" : "#/components/schemas/ClientPolicyRepresentation" } + }, + "globalPolicies" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ClientPolicyRepresentation" + } } } }, @@ -13418,6 +13666,9 @@ "description" : { "type" : "string" }, + "type" : { + "type" : "string" + }, "rootUrl" : { "type" : "string" }, @@ -13662,6 +13913,40 @@ }, "deprecated" : true }, + "ClientTypeRepresentation" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "provider" : { + "type" : "string" + }, + "config" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/components/schemas/PropertyConfig" + } + } + } + }, + "ClientTypesRepresentation" : { + "type" : "object", + "properties" : { + "client-types" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ClientTypeRepresentation" + } + }, + "global-client-types" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ClientTypeRepresentation" + } + } + } + }, "ComponentExportRepresentation" : { "type" : "object", "properties" : { @@ -14090,7 +14375,7 @@ "format" : "int64", "type" : "integer" }, - "session_state" : { + "sid" : { "type" : "string" }, "at_hash" : { @@ -14165,15 +14450,6 @@ }, "s_hash" : { "type" : "string" - }, - "authTime" : { - "format" : "int32", - "type" : "integer", - "writeOnly" : true, - "deprecated" : true - }, - "sid" : { - "type" : "string" } } }, @@ -14475,15 +14751,6 @@ } } }, - "MultivaluedMapStringString" : { - "type" : "object", - "additionalProperties" : { - "type" : "array", - "items" : { - "type" : "string" - } - } - }, "OAuthClientRepresentation" : { "type" : "object", "properties" : { @@ -14496,6 +14763,9 @@ "description" : { "type" : "string" }, + "type" : { + "type" : "string" + }, "rootUrl" : { "type" : "string" }, @@ -14665,6 +14935,62 @@ }, "deprecated" : true }, + "OrganizationDomainRepresentation" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "verified" : { + "type" : "boolean" + } + } + }, + "OrganizationRepresentation" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "enabled" : { + "type" : "boolean" + }, + "description" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "additionalProperties" : { + "type" : "array", + "items" : { + "type" : "string" + } + } + }, + "domains" : { + "uniqueItems" : true, + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/OrganizationDomainRepresentation" + } + }, + "members" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/UserRepresentation" + } + }, + "identityProviders" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/IdentityProviderRepresentation" + } + } + } + }, "PathCacheConfig" : { "type" : "object", "properties" : { @@ -14726,17 +15052,6 @@ } } }, - "PathSegment" : { - "type" : "object", - "properties" : { - "path" : { - "type" : "string" - }, - "matrixParameters" : { - "$ref" : "#/components/schemas/MultivaluedMapStringString" - } - } - }, "Permission" : { "type" : "object", "properties" : { @@ -14978,6 +15293,15 @@ } } }, + "PropertyConfig" : { + "type" : "object", + "properties" : { + "applicable" : { + "type" : "boolean" + }, + "value" : { } + } + }, "ProtocolMapperEvaluationRepresentation" : { "type" : "object", "properties" : { @@ -15648,6 +15972,15 @@ "userManagedAccessAllowed" : { "type" : "boolean" }, + "organizationsEnabled" : { + "type" : "boolean" + }, + "organizations" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/OrganizationRepresentation" + } + }, "social" : { "type" : "boolean", "deprecated" : true @@ -15704,6 +16037,28 @@ } } }, + "RequiredActionConfigInfoRepresentation" : { + "type" : "object", + "properties" : { + "properties" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ConfigPropertyRepresentation" + } + } + } + }, + "RequiredActionConfigRepresentation" : { + "type" : "object", + "properties" : { + "config" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + } + } + }, "RequiredActionProviderRepresentation" : { "type" : "object", "properties" : { @@ -16448,6 +16803,9 @@ "additionalProperties" : { "type" : "string" } + }, + "transientUser" : { + "type" : "boolean" } } } diff --git a/examples/openapi.patch.toml b/examples/openapi.patch.toml index 088a41e..cf57f2f 100644 --- a/examples/openapi.patch.toml +++ b/examples/openapi.patch.toml @@ -7,9 +7,6 @@ rust_type = "RequiredActionProviderRepresentation" [path."/admin/realms/{realm}/authentication/unregistered-required-actions:get:"] from_type = "TypeVec>" rust_type = "TypeVec" -[path."/admin/realms/{realm}/group-by-path/{path}:get:path"] -from_type = "&[PathSegment]" -rust_type = "&str" [path."/admin/realms/{realm}/identity-provider/providers/{provider_id}:get:"] from_type = "Value" rust_type = "IdentityProviderRepresentation" \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index a6d032d..84b4669 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,7 +7,7 @@ Dual-licensed under `MIT` or the [UNLICENSE](http://unlicense.org/). ## Features -Implements [Keycloak Admin REST API version 24.0.3](https://www.keycloak.org/docs-api/24.0.3/rest-api/index.html). +Implements [Keycloak Admin REST API version 25.0.0](https://www.keycloak.org/docs-api/25.0.0/rest-api/index.html). ### Feature flags @@ -25,7 +25,7 @@ Add dependency to Cargo.toml: ```toml [dependencies] -keycloak = "24.0" +keycloak = "25.0" ``` ```rust#ignore diff --git a/src/rest/generated_rest.rs b/src/rest/generated_rest.rs index 2ed2668..4476e97 100644 --- a/src/rest/generated_rest.rs +++ b/src/rest/generated_rest.rs @@ -16,7 +16,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/attack-detection/brute-force/users` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-attack-detection")] pub async fn realm_attack_detection_brute_force_users_delete( &self, @@ -45,7 +45,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/attack-detection/brute-force/users/{user_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/attack-detection/brute-force/users/{userId}` #[cfg(feature = "tag-attack-detection")] @@ -76,7 +76,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/attack-detection/brute-force/users/{user_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/attack-detection/brute-force/users/{userId}` #[cfg(feature = "tag-attack-detection")] @@ -109,7 +109,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/authentication/authenticator-providers` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_authenticator_providers_get( &self, @@ -136,7 +136,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/authentication/client-authenticator-providers` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_client_authenticator_providers_get( &self, @@ -166,7 +166,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/authentication/config` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] #[deprecated] pub async fn realm_authentication_config_post( @@ -197,7 +197,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/authentication/config-description/{provider_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/authentication/config-description/{providerId}` #[cfg(feature = "tag-authentication-management")] @@ -228,7 +228,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/authentication/config/{id}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_config_with_id_get( &self, @@ -258,7 +258,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/authentication/config/{id}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_config_with_id_put( &self, @@ -290,7 +290,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/authentication/config/{id}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_config_with_id_delete( &self, @@ -322,7 +322,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/authentication/executions` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_executions_post( &self, @@ -352,7 +352,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/authentication/executions/{execution_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/authentication/executions/{executionId}` #[cfg(feature = "tag-authentication-management")] @@ -360,7 +360,7 @@ impl KeycloakAdmin { &self, realm: &str, execution_id: &str, - ) -> Result<(), KeycloakError> { + ) -> Result { let builder = self .client .get(&format!( @@ -369,8 +369,7 @@ impl KeycloakAdmin { )) .bearer_auth(self.token_supplier.get(&self.url).await?); let response = builder.send().await?; - error_check(response).await?; - Ok(()) + Ok(error_check(response).await?.json().await?) } /// Delete execution @@ -384,7 +383,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/authentication/executions/{execution_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/authentication/executions/{executionId}` #[cfg(feature = "tag-authentication-management")] @@ -419,7 +418,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/authentication/executions/{execution_id}/config` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/authentication/executions/{executionId}/config` #[cfg(feature = "tag-authentication-management")] @@ -453,7 +452,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/authentication/executions/{execution_id}/config/{id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/authentication/executions/{executionId}/config/{id}` #[cfg(feature = "tag-authentication-management")] @@ -488,7 +487,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/authentication/executions/{execution_id}/lower-priority` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/authentication/executions/{executionId}/lower-priority` #[cfg(feature = "tag-authentication-management")] @@ -521,7 +520,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/authentication/executions/{execution_id}/raise-priority` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/authentication/executions/{executionId}/raise-priority` #[cfg(feature = "tag-authentication-management")] @@ -551,7 +550,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/authentication/flows` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_flows_get( &self, @@ -581,7 +580,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/authentication/flows` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_flows_post( &self, @@ -614,7 +613,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/authentication/flows/{flow_alias}/copy` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/authentication/flows/{flowAlias}/copy` #[cfg(feature = "tag-authentication-management")] @@ -647,7 +646,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/authentication/flows/{flow_alias}/executions` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/authentication/flows/{flowAlias}/executions` #[cfg(feature = "tag-authentication-management")] @@ -655,7 +654,7 @@ impl KeycloakAdmin { &self, realm: &str, flow_alias: &str, - ) -> Result<(), KeycloakError> { + ) -> Result, KeycloakError> { let builder = self .client .get(&format!( @@ -664,8 +663,7 @@ impl KeycloakAdmin { )) .bearer_auth(self.token_supplier.get(&self.url).await?); let response = builder.send().await?; - error_check(response).await?; - Ok(()) + Ok(error_check(response).await?.json().await?) } /// Update authentication executions of a Flow @@ -680,7 +678,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/authentication/flows/{flow_alias}/executions` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/authentication/flows/{flowAlias}/executions` #[cfg(feature = "tag-authentication-management")] @@ -717,7 +715,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/authentication/flows/{flow_alias}/executions/execution` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/authentication/flows/{flowAlias}/executions/execution` #[cfg(feature = "tag-authentication-management")] @@ -725,7 +723,7 @@ impl KeycloakAdmin { &self, realm: &str, flow_alias: &str, - body: TypeMap, + body: TypeMap, ) -> Result, KeycloakError> { let builder = self .client @@ -753,7 +751,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/authentication/flows/{flow_alias}/executions/flow` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/authentication/flows/{flowAlias}/executions/flow` #[cfg(feature = "tag-authentication-management")] @@ -761,7 +759,7 @@ impl KeycloakAdmin { &self, realm: &str, flow_alias: &str, - body: TypeMap, + body: TypeMap, ) -> Result, KeycloakError> { let builder = self .client @@ -786,7 +784,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/authentication/flows/{id}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_flows_with_id_get( &self, @@ -816,7 +814,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/authentication/flows/{id}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_flows_with_id_put( &self, @@ -848,7 +846,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/authentication/flows/{id}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_flows_with_id_delete( &self, @@ -877,7 +875,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/authentication/form-action-providers` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_form_action_providers_get( &self, @@ -904,7 +902,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/authentication/form-providers` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_form_providers_get( &self, @@ -931,7 +929,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/authentication/per-client-config-description` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_per_client_config_description_get( &self, @@ -961,7 +959,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/authentication/register-required-action` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_register_required_action_post( &self, @@ -990,7 +988,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/authentication/required-actions` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_required_actions_get( &self, @@ -1018,7 +1016,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/authentication/required-actions/{alias}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_required_actions_with_alias_get( &self, @@ -1048,7 +1046,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/authentication/required-actions/{alias}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_required_actions_with_alias_put( &self, @@ -1080,7 +1078,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/authentication/required-actions/{alias}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_required_actions_with_alias_delete( &self, @@ -1099,6 +1097,127 @@ impl KeycloakAdmin { Ok(()) } + /// Get RequiredAction configuration + /// + /// Parameters: + /// + /// - `realm`: realm name (not id!) + /// - `alias`: Alias of required action + /// + /// Resource: `Authentication Management` + /// + /// `GET /admin/realms/{realm}/authentication/required-actions/{alias}/config` + /// + /// Documentation: + #[cfg(feature = "tag-authentication-management")] + pub async fn realm_authentication_required_actions_with_alias_config_get( + &self, + realm: &str, + alias: &str, + ) -> Result { + let builder = self + .client + .get(&format!( + "{}/admin/realms/{realm}/authentication/required-actions/{alias}/config", + self.url + )) + .bearer_auth(self.token_supplier.get(&self.url).await?); + let response = builder.send().await?; + Ok(error_check(response).await?.json().await?) + } + + /// Update RequiredAction configuration + /// + /// Parameters: + /// + /// - `realm`: realm name (not id!) + /// - `alias`: Alias of required action + /// - `body` + /// + /// Resource: `Authentication Management` + /// + /// `PUT /admin/realms/{realm}/authentication/required-actions/{alias}/config` + /// + /// Documentation: + #[cfg(feature = "tag-authentication-management")] + pub async fn realm_authentication_required_actions_with_alias_config_put( + &self, + realm: &str, + alias: &str, + body: RequiredActionConfigRepresentation, + ) -> Result<(), KeycloakError> { + let builder = self + .client + .put(&format!( + "{}/admin/realms/{realm}/authentication/required-actions/{alias}/config", + self.url + )) + .json(&body) + .bearer_auth(self.token_supplier.get(&self.url).await?); + let response = builder.send().await?; + error_check(response).await?; + Ok(()) + } + + /// Delete RequiredAction configuration + /// + /// Parameters: + /// + /// - `realm`: realm name (not id!) + /// - `alias`: Alias of required action + /// + /// Resource: `Authentication Management` + /// + /// `DELETE /admin/realms/{realm}/authentication/required-actions/{alias}/config` + /// + /// Documentation: + #[cfg(feature = "tag-authentication-management")] + pub async fn realm_authentication_required_actions_with_alias_config_delete( + &self, + realm: &str, + alias: &str, + ) -> Result<(), KeycloakError> { + let builder = self + .client + .delete(&format!( + "{}/admin/realms/{realm}/authentication/required-actions/{alias}/config", + self.url + )) + .bearer_auth(self.token_supplier.get(&self.url).await?); + let response = builder.send().await?; + error_check(response).await?; + Ok(()) + } + + /// Get RequiredAction provider configuration description + /// + /// Parameters: + /// + /// - `realm`: realm name (not id!) + /// - `alias`: Alias of required action + /// + /// Resource: `Authentication Management` + /// + /// `GET /admin/realms/{realm}/authentication/required-actions/{alias}/config-description` + /// + /// Documentation: + #[cfg(feature = "tag-authentication-management")] + pub async fn realm_authentication_required_actions_with_alias_config_description_get( + &self, + realm: &str, + alias: &str, + ) -> Result { + let builder = self + .client + .get(&format!( + "{}/admin/realms/{realm}/authentication/required-actions/{alias}/config-description", + self.url + )) + .bearer_auth(self.token_supplier.get(&self.url).await?); + let response = builder.send().await?; + Ok(error_check(response).await?.json().await?) + } + /// Lower required action's priority /// /// Parameters: @@ -1112,7 +1231,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/authentication/required-actions/{alias}/lower-priority` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_required_actions_with_alias_lower_priority_post( &self, @@ -1143,7 +1262,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/authentication/required-actions/{alias}/raise-priority` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_required_actions_with_alias_raise_priority_post( &self, @@ -1171,7 +1290,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/authentication/unregistered-required-actions` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-authentication-management")] pub async fn realm_authentication_unregistered_required_actions_get( &self, @@ -1202,7 +1321,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/certificates/{attr}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/certificates/{attr}` #[cfg(feature = "tag-client-attribute-certificate")] @@ -1236,7 +1355,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/clients/{client_uuid}/certificates/{attr}/download` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/clients/{client-uuid}/certificates/{attr}/download` #[cfg(feature = "tag-client-attribute-certificate")] @@ -1271,7 +1390,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/clients/{client_uuid}/certificates/{attr}/generate` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/clients/{client-uuid}/certificates/{attr}/generate` #[cfg(feature = "tag-client-attribute-certificate")] @@ -1308,7 +1427,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/clients/{client_uuid}/certificates/{attr}/generate-and-download` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/clients/{client-uuid}/certificates/{attr}/generate-and-download` #[cfg(feature = "tag-client-attribute-certificate")] @@ -1343,7 +1462,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/clients/{client_uuid}/certificates/{attr}/upload` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/clients/{client-uuid}/certificates/{attr}/upload` #[cfg(feature = "tag-client-attribute-certificate")] @@ -1376,7 +1495,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/clients/{client_uuid}/certificates/{attr}/upload-certificate` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/clients/{client-uuid}/certificates/{attr}/upload-certificate` #[cfg(feature = "tag-client-attribute-certificate")] @@ -1407,7 +1526,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients-initial-access` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-client-initial-access")] pub async fn realm_clients_initial_access_get( &self, @@ -1435,7 +1554,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/clients-initial-access` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-client-initial-access")] pub async fn realm_clients_initial_access_post( &self, @@ -1463,7 +1582,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/clients-initial-access/{id}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-client-initial-access")] pub async fn realm_clients_initial_access_with_id_delete( &self, @@ -1494,7 +1613,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-registration-policy/providers` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-client-registration-policy")] pub async fn realm_client_registration_policy_providers_get( &self, @@ -1513,32 +1632,32 @@ impl KeycloakAdmin { //

Client Role Mappings

- /// Get client-level role mappings for the user, and the app + /// Get client-level role mappings for the user or group, and the app /// /// Parameters: /// /// - `realm`: realm name (not id!) /// - `group_id` - /// - `client` + /// - `client_id`: client id (not clientId!) /// /// Resource: `Client Role Mappings` /// - /// `GET /admin/realms/{realm}/groups/{group_id}/role-mappings/clients/{client}` + /// `GET /admin/realms/{realm}/groups/{group_id}/role-mappings/clients/{client_id}` /// - /// Documentation: + /// Documentation: /// - /// REST method: `GET /admin/realms/{realm}/groups/{group-id}/role-mappings/clients/{client}` + /// REST method: `GET /admin/realms/{realm}/groups/{group-id}/role-mappings/clients/{client-id}` #[cfg(feature = "tag-client-role-mappings")] - pub async fn realm_groups_with_group_id_role_mappings_clients_with_client_get( + pub async fn realm_groups_with_group_id_role_mappings_clients_with_client_id_get( &self, realm: &str, group_id: &str, - client: &str, + client_id: &str, ) -> Result, KeycloakError> { let builder = self .client .get(&format!( - "{}/admin/realms/{realm}/groups/{group_id}/role-mappings/clients/{client}", + "{}/admin/realms/{realm}/groups/{group_id}/role-mappings/clients/{client_id}", self.url )) .bearer_auth(self.token_supplier.get(&self.url).await?); @@ -1546,36 +1665,36 @@ impl KeycloakAdmin { Ok(error_check(response).await?.json().await?) } - /// Add client-level roles to the user role mapping + /// Add client-level roles to the user or group role mapping /// /// Parameters: /// /// - `realm`: realm name (not id!) /// - `group_id` - /// - `client` + /// - `client_id`: client id (not clientId!) /// - `body` /// /// Returns id of created resource /// /// Resource: `Client Role Mappings` /// - /// `POST /admin/realms/{realm}/groups/{group_id}/role-mappings/clients/{client}` + /// `POST /admin/realms/{realm}/groups/{group_id}/role-mappings/clients/{client_id}` /// - /// Documentation: + /// Documentation: /// - /// REST method: `POST /admin/realms/{realm}/groups/{group-id}/role-mappings/clients/{client}` + /// REST method: `POST /admin/realms/{realm}/groups/{group-id}/role-mappings/clients/{client-id}` #[cfg(feature = "tag-client-role-mappings")] - pub async fn realm_groups_with_group_id_role_mappings_clients_with_client_post( + pub async fn realm_groups_with_group_id_role_mappings_clients_with_client_id_post( &self, realm: &str, group_id: &str, - client: &str, + client_id: &str, body: Vec, ) -> Result, KeycloakError> { let builder = self .client .post(&format!( - "{}/admin/realms/{realm}/groups/{group_id}/role-mappings/clients/{client}", + "{}/admin/realms/{realm}/groups/{group_id}/role-mappings/clients/{client_id}", self.url )) .json(&body) @@ -1584,34 +1703,34 @@ impl KeycloakAdmin { error_check(response).await.map(to_id) } - /// Delete client-level roles from user role mapping + /// Delete client-level roles from user or group role mapping /// /// Parameters: /// /// - `realm`: realm name (not id!) /// - `group_id` - /// - `client` + /// - `client_id`: client id (not clientId!) /// - `body` /// /// Resource: `Client Role Mappings` /// - /// `DELETE /admin/realms/{realm}/groups/{group_id}/role-mappings/clients/{client}` + /// `DELETE /admin/realms/{realm}/groups/{group_id}/role-mappings/clients/{client_id}` /// - /// Documentation: + /// Documentation: /// - /// REST method: `DELETE /admin/realms/{realm}/groups/{group-id}/role-mappings/clients/{client}` + /// REST method: `DELETE /admin/realms/{realm}/groups/{group-id}/role-mappings/clients/{client-id}` #[cfg(feature = "tag-client-role-mappings")] - pub async fn realm_groups_with_group_id_role_mappings_clients_with_client_delete( + pub async fn realm_groups_with_group_id_role_mappings_clients_with_client_id_delete( &self, realm: &str, group_id: &str, - client: &str, + client_id: &str, body: Vec, ) -> Result<(), KeycloakError> { let builder = self .client .delete(&format!( - "{}/admin/realms/{realm}/groups/{group_id}/role-mappings/clients/{client}", + "{}/admin/realms/{realm}/groups/{group_id}/role-mappings/clients/{client_id}", self.url )) .json(&body) @@ -1621,32 +1740,32 @@ impl KeycloakAdmin { Ok(()) } - /// Get available client-level roles that can be mapped to the user + /// Get available client-level roles that can be mapped to the user or group /// /// Parameters: /// /// - `realm`: realm name (not id!) /// - `group_id` - /// - `client` + /// - `client_id`: client id (not clientId!) /// /// Resource: `Client Role Mappings` /// - /// `GET /admin/realms/{realm}/groups/{group_id}/role-mappings/clients/{client}/available` + /// `GET /admin/realms/{realm}/groups/{group_id}/role-mappings/clients/{client_id}/available` /// - /// Documentation: + /// Documentation: /// - /// REST method: `GET /admin/realms/{realm}/groups/{group-id}/role-mappings/clients/{client}/available` + /// REST method: `GET /admin/realms/{realm}/groups/{group-id}/role-mappings/clients/{client-id}/available` #[cfg(feature = "tag-client-role-mappings")] - pub async fn realm_groups_with_group_id_role_mappings_clients_with_client_available_get( + pub async fn realm_groups_with_group_id_role_mappings_clients_with_client_id_available_get( &self, realm: &str, group_id: &str, - client: &str, + client_id: &str, ) -> Result, KeycloakError> { let builder = self .client .get(&format!( - "{}/admin/realms/{realm}/groups/{group_id}/role-mappings/clients/{client}/available", + "{}/admin/realms/{realm}/groups/{group_id}/role-mappings/clients/{client_id}/available", self.url )) .bearer_auth(self.token_supplier.get(&self.url).await?); @@ -1660,28 +1779,28 @@ impl KeycloakAdmin { /// /// - `realm`: realm name (not id!) /// - `group_id` - /// - `client` + /// - `client_id`: client id (not clientId!) /// - `brief_representation`: if false, return roles with their attributes /// /// Resource: `Client Role Mappings` /// - /// `GET /admin/realms/{realm}/groups/{group_id}/role-mappings/clients/{client}/composite` + /// `GET /admin/realms/{realm}/groups/{group_id}/role-mappings/clients/{client_id}/composite` /// - /// Documentation: + /// Documentation: /// - /// REST method: `GET /admin/realms/{realm}/groups/{group-id}/role-mappings/clients/{client}/composite` + /// REST method: `GET /admin/realms/{realm}/groups/{group-id}/role-mappings/clients/{client-id}/composite` #[cfg(feature = "tag-client-role-mappings")] - pub async fn realm_groups_with_group_id_role_mappings_clients_with_client_composite_get( + pub async fn realm_groups_with_group_id_role_mappings_clients_with_client_id_composite_get( &self, realm: &str, group_id: &str, - client: &str, + client_id: &str, brief_representation: Option, ) -> Result, KeycloakError> { let mut builder = self .client .get(&format!( - "{}/admin/realms/{realm}/groups/{group_id}/role-mappings/clients/{client}/composite", + "{}/admin/realms/{realm}/groups/{group_id}/role-mappings/clients/{client_id}/composite", self.url )) .bearer_auth(self.token_supplier.get(&self.url).await?); @@ -1692,32 +1811,32 @@ impl KeycloakAdmin { Ok(error_check(response).await?.json().await?) } - /// Get client-level role mappings for the user, and the app + /// Get client-level role mappings for the user or group, and the app /// /// Parameters: /// /// - `realm`: realm name (not id!) /// - `user_id` - /// - `client` + /// - `client_id`: client id (not clientId!) /// /// Resource: `Client Role Mappings` /// - /// `GET /admin/realms/{realm}/users/{user_id}/role-mappings/clients/{client}` + /// `GET /admin/realms/{realm}/users/{user_id}/role-mappings/clients/{client_id}` /// - /// Documentation: + /// Documentation: /// - /// REST method: `GET /admin/realms/{realm}/users/{user-id}/role-mappings/clients/{client}` + /// REST method: `GET /admin/realms/{realm}/users/{user-id}/role-mappings/clients/{client-id}` #[cfg(feature = "tag-client-role-mappings")] - pub async fn realm_users_with_user_id_role_mappings_clients_with_client_get( + pub async fn realm_users_with_user_id_role_mappings_clients_with_client_id_get( &self, realm: &str, user_id: &str, - client: &str, + client_id: &str, ) -> Result, KeycloakError> { let builder = self .client .get(&format!( - "{}/admin/realms/{realm}/users/{user_id}/role-mappings/clients/{client}", + "{}/admin/realms/{realm}/users/{user_id}/role-mappings/clients/{client_id}", self.url )) .bearer_auth(self.token_supplier.get(&self.url).await?); @@ -1725,36 +1844,36 @@ impl KeycloakAdmin { Ok(error_check(response).await?.json().await?) } - /// Add client-level roles to the user role mapping + /// Add client-level roles to the user or group role mapping /// /// Parameters: /// /// - `realm`: realm name (not id!) /// - `user_id` - /// - `client` + /// - `client_id`: client id (not clientId!) /// - `body` /// /// Returns id of created resource /// /// Resource: `Client Role Mappings` /// - /// `POST /admin/realms/{realm}/users/{user_id}/role-mappings/clients/{client}` + /// `POST /admin/realms/{realm}/users/{user_id}/role-mappings/clients/{client_id}` /// - /// Documentation: + /// Documentation: /// - /// REST method: `POST /admin/realms/{realm}/users/{user-id}/role-mappings/clients/{client}` + /// REST method: `POST /admin/realms/{realm}/users/{user-id}/role-mappings/clients/{client-id}` #[cfg(feature = "tag-client-role-mappings")] - pub async fn realm_users_with_user_id_role_mappings_clients_with_client_post( + pub async fn realm_users_with_user_id_role_mappings_clients_with_client_id_post( &self, realm: &str, user_id: &str, - client: &str, + client_id: &str, body: Vec, ) -> Result, KeycloakError> { let builder = self .client .post(&format!( - "{}/admin/realms/{realm}/users/{user_id}/role-mappings/clients/{client}", + "{}/admin/realms/{realm}/users/{user_id}/role-mappings/clients/{client_id}", self.url )) .json(&body) @@ -1763,34 +1882,34 @@ impl KeycloakAdmin { error_check(response).await.map(to_id) } - /// Delete client-level roles from user role mapping + /// Delete client-level roles from user or group role mapping /// /// Parameters: /// /// - `realm`: realm name (not id!) /// - `user_id` - /// - `client` + /// - `client_id`: client id (not clientId!) /// - `body` /// /// Resource: `Client Role Mappings` /// - /// `DELETE /admin/realms/{realm}/users/{user_id}/role-mappings/clients/{client}` + /// `DELETE /admin/realms/{realm}/users/{user_id}/role-mappings/clients/{client_id}` /// - /// Documentation: + /// Documentation: /// - /// REST method: `DELETE /admin/realms/{realm}/users/{user-id}/role-mappings/clients/{client}` + /// REST method: `DELETE /admin/realms/{realm}/users/{user-id}/role-mappings/clients/{client-id}` #[cfg(feature = "tag-client-role-mappings")] - pub async fn realm_users_with_user_id_role_mappings_clients_with_client_delete( + pub async fn realm_users_with_user_id_role_mappings_clients_with_client_id_delete( &self, realm: &str, user_id: &str, - client: &str, + client_id: &str, body: Vec, ) -> Result<(), KeycloakError> { let builder = self .client .delete(&format!( - "{}/admin/realms/{realm}/users/{user_id}/role-mappings/clients/{client}", + "{}/admin/realms/{realm}/users/{user_id}/role-mappings/clients/{client_id}", self.url )) .json(&body) @@ -1800,32 +1919,32 @@ impl KeycloakAdmin { Ok(()) } - /// Get available client-level roles that can be mapped to the user + /// Get available client-level roles that can be mapped to the user or group /// /// Parameters: /// /// - `realm`: realm name (not id!) /// - `user_id` - /// - `client` + /// - `client_id`: client id (not clientId!) /// /// Resource: `Client Role Mappings` /// - /// `GET /admin/realms/{realm}/users/{user_id}/role-mappings/clients/{client}/available` + /// `GET /admin/realms/{realm}/users/{user_id}/role-mappings/clients/{client_id}/available` /// - /// Documentation: + /// Documentation: /// - /// REST method: `GET /admin/realms/{realm}/users/{user-id}/role-mappings/clients/{client}/available` + /// REST method: `GET /admin/realms/{realm}/users/{user-id}/role-mappings/clients/{client-id}/available` #[cfg(feature = "tag-client-role-mappings")] - pub async fn realm_users_with_user_id_role_mappings_clients_with_client_available_get( + pub async fn realm_users_with_user_id_role_mappings_clients_with_client_id_available_get( &self, realm: &str, user_id: &str, - client: &str, + client_id: &str, ) -> Result, KeycloakError> { let builder = self .client .get(&format!( - "{}/admin/realms/{realm}/users/{user_id}/role-mappings/clients/{client}/available", + "{}/admin/realms/{realm}/users/{user_id}/role-mappings/clients/{client_id}/available", self.url )) .bearer_auth(self.token_supplier.get(&self.url).await?); @@ -1839,28 +1958,28 @@ impl KeycloakAdmin { /// /// - `realm`: realm name (not id!) /// - `user_id` - /// - `client` + /// - `client_id`: client id (not clientId!) /// - `brief_representation`: if false, return roles with their attributes /// /// Resource: `Client Role Mappings` /// - /// `GET /admin/realms/{realm}/users/{user_id}/role-mappings/clients/{client}/composite` + /// `GET /admin/realms/{realm}/users/{user_id}/role-mappings/clients/{client_id}/composite` /// - /// Documentation: + /// Documentation: /// - /// REST method: `GET /admin/realms/{realm}/users/{user-id}/role-mappings/clients/{client}/composite` + /// REST method: `GET /admin/realms/{realm}/users/{user-id}/role-mappings/clients/{client-id}/composite` #[cfg(feature = "tag-client-role-mappings")] - pub async fn realm_users_with_user_id_role_mappings_clients_with_client_composite_get( + pub async fn realm_users_with_user_id_role_mappings_clients_with_client_id_composite_get( &self, realm: &str, user_id: &str, - client: &str, + client_id: &str, brief_representation: Option, ) -> Result, KeycloakError> { let mut builder = self .client .get(&format!( - "{}/admin/realms/{realm}/users/{user_id}/role-mappings/clients/{client}/composite", + "{}/admin/realms/{realm}/users/{user_id}/role-mappings/clients/{client_id}/composite", self.url )) .bearer_auth(self.token_supplier.get(&self.url).await?); @@ -1883,7 +2002,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-scopes` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-client-scopes")] pub async fn realm_client_scopes_get( &self, @@ -1910,7 +2029,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/client-scopes` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-client-scopes")] pub async fn realm_client_scopes_post( &self, @@ -1937,7 +2056,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-scopes/{client_scope_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-scopes/{client-scope-id}` #[cfg(feature = "tag-client-scopes")] @@ -1969,7 +2088,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/client-scopes/{client_scope_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/client-scopes/{client-scope-id}` #[cfg(feature = "tag-client-scopes")] @@ -2003,7 +2122,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/client-scopes/{client_scope_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/client-scopes/{client-scope-id}` #[cfg(feature = "tag-client-scopes")] @@ -2034,7 +2153,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-templates` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-client-scopes")] pub async fn realm_client_templates_get( &self, @@ -2064,7 +2183,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/client-templates` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-client-scopes")] pub async fn realm_client_templates_post( &self, @@ -2094,7 +2213,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-templates/{client_scope_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-templates/{client-scope-id}` #[cfg(feature = "tag-client-scopes")] @@ -2126,7 +2245,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/client-templates/{client_scope_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/client-templates/{client-scope-id}` #[cfg(feature = "tag-client-scopes")] @@ -2160,7 +2279,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/client-templates/{client_scope_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/client-templates/{client-scope-id}` #[cfg(feature = "tag-client-scopes")] @@ -2199,7 +2318,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-clients")] #[allow(clippy::too_many_arguments)] pub async fn realm_clients_get( @@ -2251,7 +2370,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/clients` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-clients")] pub async fn realm_clients_post( &self, @@ -2278,7 +2397,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}` #[cfg(feature = "tag-clients")] @@ -2310,7 +2429,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/clients/{client_uuid}` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/clients/{client-uuid}` #[cfg(feature = "tag-clients")] @@ -2344,7 +2463,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/clients/{client_uuid}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/clients/{client-uuid}` #[cfg(feature = "tag-clients")] @@ -2376,7 +2495,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/client-secret` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/client-secret` #[cfg(feature = "tag-clients")] @@ -2407,7 +2526,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/clients/{client_uuid}/client-secret` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/clients/{client-uuid}/client-secret` #[cfg(feature = "tag-clients")] @@ -2438,7 +2557,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/client-secret/rotated` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/client-secret/rotated` #[cfg(feature = "tag-clients")] @@ -2469,7 +2588,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/clients/{client_uuid}/client-secret/rotated` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/clients/{client-uuid}/client-secret/rotated` #[cfg(feature = "tag-clients")] @@ -2501,7 +2620,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/default-client-scopes` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/default-client-scopes` #[cfg(feature = "tag-clients")] @@ -2531,7 +2650,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/clients/{client_uuid}/default-client-scopes/{client_scope_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/clients/{client-uuid}/default-client-scopes/{clientScopeId}` #[cfg(feature = "tag-clients")] @@ -2564,7 +2683,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/clients/{client_uuid}/default-client-scopes/{client_scope_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/clients/{client-uuid}/default-client-scopes/{clientScopeId}` #[cfg(feature = "tag-clients")] @@ -2599,7 +2718,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/evaluate-scopes/generate-example-access-token` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/evaluate-scopes/generate-example-access-token` #[cfg(feature = "tag-clients")] @@ -2640,7 +2759,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/evaluate-scopes/generate-example-id-token` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/evaluate-scopes/generate-example-id-token` #[cfg(feature = "tag-clients")] @@ -2681,7 +2800,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/evaluate-scopes/generate-example-userinfo` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/evaluate-scopes/generate-example-userinfo` #[cfg(feature = "tag-clients")] @@ -2721,7 +2840,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/evaluate-scopes/protocol-mappers` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/evaluate-scopes/protocol-mappers` #[cfg(feature = "tag-clients")] @@ -2758,7 +2877,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/evaluate-scopes/scope-mappings/{role_container_id}/granted` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/evaluate-scopes/scope-mappings/{roleContainerId}/granted` #[cfg(feature = "tag-clients")] @@ -2796,7 +2915,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/evaluate-scopes/scope-mappings/{role_container_id}/not-granted` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/evaluate-scopes/scope-mappings/{roleContainerId}/not-granted` #[cfg(feature = "tag-clients")] @@ -2831,7 +2950,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/installation/providers/{provider_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/installation/providers/{providerId}` #[cfg(feature = "tag-clients")] @@ -2864,7 +2983,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/management/permissions` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/management/permissions` #[cfg(feature = "tag-clients")] @@ -2896,7 +3015,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/clients/{client_uuid}/management/permissions` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/clients/{client-uuid}/management/permissions` #[cfg(feature = "tag-clients")] @@ -2932,7 +3051,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/clients/{client_uuid}/nodes` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/clients/{client-uuid}/nodes` #[cfg(feature = "tag-clients")] @@ -2966,7 +3085,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/clients/{client_uuid}/nodes/{node}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/clients/{client-uuid}/nodes/{node}` #[cfg(feature = "tag-clients")] @@ -2999,7 +3118,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/offline-session-count` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/offline-session-count` #[cfg(feature = "tag-clients")] @@ -3032,7 +3151,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/offline-sessions` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/offline-sessions` #[cfg(feature = "tag-clients")] @@ -3071,7 +3190,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/optional-client-scopes` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/optional-client-scopes` #[cfg(feature = "tag-clients")] @@ -3101,7 +3220,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/clients/{client_uuid}/optional-client-scopes/{client_scope_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/clients/{client-uuid}/optional-client-scopes/{clientScopeId}` #[cfg(feature = "tag-clients")] @@ -3134,7 +3253,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/clients/{client_uuid}/optional-client-scopes/{client_scope_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/clients/{client-uuid}/optional-client-scopes/{clientScopeId}` #[cfg(feature = "tag-clients")] @@ -3167,7 +3286,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/clients/{client_uuid}/push-revocation` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/clients/{client-uuid}/push-revocation` #[cfg(feature = "tag-clients")] @@ -3198,7 +3317,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/clients/{client_uuid}/registration-access-token` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/clients/{client-uuid}/registration-access-token` #[cfg(feature = "tag-clients")] @@ -3229,7 +3348,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/service-account-user` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/service-account-user` #[cfg(feature = "tag-clients")] @@ -3260,7 +3379,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/session-count` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/session-count` #[cfg(feature = "tag-clients")] @@ -3291,7 +3410,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/test-nodes-available` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/test-nodes-available` #[cfg(feature = "tag-clients")] @@ -3324,7 +3443,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/user-sessions` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/user-sessions` #[cfg(feature = "tag-clients")] @@ -3365,7 +3484,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/components` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-component")] pub async fn realm_components_get( &self, @@ -3402,7 +3521,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/components` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-component")] pub async fn realm_components_post( &self, @@ -3427,7 +3546,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/components/{id}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-component")] pub async fn realm_components_with_id_get( &self, @@ -3455,7 +3574,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/components/{id}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-component")] pub async fn realm_components_with_id_put( &self, @@ -3485,7 +3604,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/components/{id}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-component")] pub async fn realm_components_with_id_delete( &self, @@ -3516,7 +3635,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/components/{id}/sub-component-types` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-component")] pub async fn realm_components_with_id_sub_component_types_get( &self, @@ -3557,7 +3676,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/groups` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-groups")] #[allow(clippy::too_many_arguments)] pub async fn realm_groups_get( @@ -3613,7 +3732,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/groups` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-groups")] pub async fn realm_groups_post( &self, @@ -3641,7 +3760,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/groups/count` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-groups")] pub async fn realm_groups_count_get( &self, @@ -3672,7 +3791,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/groups/{group_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/groups/{group-id}` #[cfg(feature = "tag-groups")] @@ -3704,7 +3823,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/groups/{group_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/groups/{group-id}` #[cfg(feature = "tag-groups")] @@ -3736,7 +3855,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/groups/{group_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/groups/{group-id}` #[cfg(feature = "tag-groups")] @@ -3763,25 +3882,30 @@ impl KeycloakAdmin { /// /// - `realm`: realm name (not id!) /// - `group_id` - /// - `brief_representation` - /// - `first` - /// - `max` + /// - `brief_representation`: Boolean which defines whether brief groups representations are returned or not (default: false) + /// - `exact`: Boolean which defines whether the params "search" must match exactly or not + /// - `first`: The position of the first result to be returned (pagination offset). + /// - `max`: The maximum number of results that are to be returned. Defaults to 10 + /// - `search`: A String representing either an exact group name or a partial name /// /// Resource: `Groups` /// /// `GET /admin/realms/{realm}/groups/{group_id}/children` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/groups/{group-id}/children` #[cfg(feature = "tag-groups")] + #[allow(clippy::too_many_arguments)] pub async fn realm_groups_with_group_id_children_get( &self, realm: &str, group_id: &str, brief_representation: Option, + exact: Option, first: Option, max: Option, + search: Option, ) -> Result, KeycloakError> { let mut builder = self .client @@ -3793,12 +3917,18 @@ impl KeycloakAdmin { if let Some(v) = brief_representation { builder = builder.query(&[("briefRepresentation", v)]); } + if let Some(v) = exact { + builder = builder.query(&[("exact", v)]); + } if let Some(v) = first { builder = builder.query(&[("first", v)]); } if let Some(v) = max { builder = builder.query(&[("max", v)]); } + if let Some(v) = search { + builder = builder.query(&[("search", v)]); + } let response = builder.send().await?; Ok(error_check(response).await?.json().await?) } @@ -3817,7 +3947,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/groups/{group_id}/children` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/groups/{group-id}/children` #[cfg(feature = "tag-groups")] @@ -3850,7 +3980,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/groups/{group_id}/management/permissions` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/groups/{group-id}/management/permissions` #[cfg(feature = "tag-groups")] @@ -3882,7 +4012,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/groups/{group_id}/management/permissions` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/groups/{group-id}/management/permissions` #[cfg(feature = "tag-groups")] @@ -3918,7 +4048,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/groups/{group_id}/members` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/groups/{group-id}/members` #[cfg(feature = "tag-groups")] @@ -3963,7 +4093,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/identity-provider/import-config` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-identity-providers")] pub async fn realm_identity_provider_import_config_post( &self, @@ -3996,7 +4126,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/identity-provider/instances` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-identity-providers")] pub async fn realm_identity_provider_instances_get( &self, @@ -4042,7 +4172,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/identity-provider/instances` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-identity-providers")] pub async fn realm_identity_provider_instances_post( &self, @@ -4072,7 +4202,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/identity-provider/instances/{alias}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-identity-providers")] pub async fn realm_identity_provider_instances_with_alias_get( &self, @@ -4102,7 +4232,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/identity-provider/instances/{alias}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-identity-providers")] pub async fn realm_identity_provider_instances_with_alias_put( &self, @@ -4134,7 +4264,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/identity-provider/instances/{alias}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-identity-providers")] pub async fn realm_identity_provider_instances_with_alias_delete( &self, @@ -4165,7 +4295,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/identity-provider/instances/{alias}/export` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-identity-providers")] pub async fn realm_identity_provider_instances_with_alias_export_get( &self, @@ -4199,7 +4329,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/identity-provider/instances/{alias}/management/permissions` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-identity-providers")] pub async fn realm_identity_provider_instances_with_alias_management_permissions_get( &self, @@ -4229,7 +4359,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/identity-provider/instances/{alias}/management/permissions` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-identity-providers")] pub async fn realm_identity_provider_instances_with_alias_management_permissions_put( &self, @@ -4260,7 +4390,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/identity-provider/instances/{alias}/mapper-types` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-identity-providers")] pub async fn realm_identity_provider_instances_with_alias_mapper_types_get( &self, @@ -4289,7 +4419,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/identity-provider/instances/{alias}/mappers` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-identity-providers")] pub async fn realm_identity_provider_instances_with_alias_mappers_get( &self, @@ -4321,7 +4451,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/identity-provider/instances/{alias}/mappers` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-identity-providers")] pub async fn realm_identity_provider_instances_with_alias_mappers_post( &self, @@ -4353,7 +4483,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/identity-provider/instances/{alias}/mappers/{id}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-identity-providers")] pub async fn realm_identity_provider_instances_with_alias_mappers_with_id_get( &self, @@ -4385,7 +4515,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/identity-provider/instances/{alias}/mappers/{id}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-identity-providers")] pub async fn realm_identity_provider_instances_with_alias_mappers_with_id_put( &self, @@ -4419,7 +4549,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/identity-provider/instances/{alias}/mappers/{id}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-identity-providers")] pub async fn realm_identity_provider_instances_with_alias_mappers_with_id_delete( &self, @@ -4450,7 +4580,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/identity-provider/instances/{alias}/reload-keys` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-identity-providers")] pub async fn realm_identity_provider_instances_with_alias_reload_keys_get( &self, @@ -4479,7 +4609,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/identity-provider/providers/{provider_id}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-identity-providers")] pub async fn realm_identity_provider_providers_with_provider_id_get( &self, @@ -4507,7 +4637,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/keys` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-key")] pub async fn realm_keys_get( &self, @@ -4537,7 +4667,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/client-scopes/{client_scope_id}/protocol-mappers/add-models` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/client-scopes/{client-scope-id}/protocol-mappers/add-models` #[cfg(feature = "tag-protocol-mappers")] @@ -4570,7 +4700,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-scopes/{client_scope_id}/protocol-mappers/models` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-scopes/{client-scope-id}/protocol-mappers/models` #[cfg(feature = "tag-protocol-mappers")] @@ -4604,7 +4734,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/client-scopes/{client_scope_id}/protocol-mappers/models` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/client-scopes/{client-scope-id}/protocol-mappers/models` #[cfg(feature = "tag-protocol-mappers")] @@ -4638,7 +4768,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-scopes/{client_scope_id}/protocol-mappers/models/{id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-scopes/{client-scope-id}/protocol-mappers/models/{id}` #[cfg(feature = "tag-protocol-mappers")] @@ -4672,7 +4802,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/client-scopes/{client_scope_id}/protocol-mappers/models/{id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/client-scopes/{client-scope-id}/protocol-mappers/models/{id}` #[cfg(feature = "tag-protocol-mappers")] @@ -4708,7 +4838,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/client-scopes/{client_scope_id}/protocol-mappers/models/{id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/client-scopes/{client-scope-id}/protocol-mappers/models/{id}` #[cfg(feature = "tag-protocol-mappers")] @@ -4742,7 +4872,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-scopes/{client_scope_id}/protocol-mappers/protocol/{protocol}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-scopes/{client-scope-id}/protocol-mappers/protocol/{protocol}` #[cfg(feature = "tag-protocol-mappers")] @@ -4777,7 +4907,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/client-templates/{client_scope_id}/protocol-mappers/add-models` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/client-templates/{client-scope-id}/protocol-mappers/add-models` #[cfg(feature = "tag-protocol-mappers")] @@ -4810,7 +4940,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-templates/{client_scope_id}/protocol-mappers/models` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-templates/{client-scope-id}/protocol-mappers/models` #[cfg(feature = "tag-protocol-mappers")] @@ -4844,7 +4974,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/client-templates/{client_scope_id}/protocol-mappers/models` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/client-templates/{client-scope-id}/protocol-mappers/models` #[cfg(feature = "tag-protocol-mappers")] @@ -4878,7 +5008,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-templates/{client_scope_id}/protocol-mappers/models/{id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-templates/{client-scope-id}/protocol-mappers/models/{id}` #[cfg(feature = "tag-protocol-mappers")] @@ -4912,7 +5042,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/client-templates/{client_scope_id}/protocol-mappers/models/{id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/client-templates/{client-scope-id}/protocol-mappers/models/{id}` #[cfg(feature = "tag-protocol-mappers")] @@ -4948,7 +5078,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/client-templates/{client_scope_id}/protocol-mappers/models/{id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/client-templates/{client-scope-id}/protocol-mappers/models/{id}` #[cfg(feature = "tag-protocol-mappers")] @@ -4982,7 +5112,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-templates/{client_scope_id}/protocol-mappers/protocol/{protocol}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-templates/{client-scope-id}/protocol-mappers/protocol/{protocol}` #[cfg(feature = "tag-protocol-mappers")] @@ -5017,7 +5147,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/clients/{client_uuid}/protocol-mappers/add-models` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/clients/{client-uuid}/protocol-mappers/add-models` #[cfg(feature = "tag-protocol-mappers")] @@ -5050,7 +5180,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/protocol-mappers/models` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/protocol-mappers/models` #[cfg(feature = "tag-protocol-mappers")] @@ -5084,7 +5214,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/clients/{client_uuid}/protocol-mappers/models` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/clients/{client-uuid}/protocol-mappers/models` #[cfg(feature = "tag-protocol-mappers")] @@ -5118,7 +5248,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/protocol-mappers/models/{id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/protocol-mappers/models/{id}` #[cfg(feature = "tag-protocol-mappers")] @@ -5152,7 +5282,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/clients/{client_uuid}/protocol-mappers/models/{id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/clients/{client-uuid}/protocol-mappers/models/{id}` #[cfg(feature = "tag-protocol-mappers")] @@ -5188,7 +5318,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/clients/{client_uuid}/protocol-mappers/models/{id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/clients/{client-uuid}/protocol-mappers/models/{id}` #[cfg(feature = "tag-protocol-mappers")] @@ -5222,7 +5352,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/protocol-mappers/protocol/{protocol}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/protocol-mappers/protocol/{protocol}` #[cfg(feature = "tag-protocol-mappers")] @@ -5255,7 +5385,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn get( &self, @@ -5284,7 +5414,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn post( &self, @@ -5309,7 +5439,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_get(&self, realm: &str) -> Result { let builder = self @@ -5331,7 +5461,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_put( &self, @@ -5358,7 +5488,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_delete(&self, realm: &str) -> Result<(), KeycloakError> { let builder = self @@ -5391,7 +5521,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/admin-events` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] #[allow(clippy::too_many_arguments)] pub async fn realm_admin_events_get( @@ -5468,7 +5598,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/admin-events` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_admin_events_delete(&self, realm: &str) -> Result<(), KeycloakError> { let builder = self @@ -5491,7 +5621,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/client-description-converter` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_client_description_converter_post( &self, @@ -5513,24 +5643,29 @@ impl KeycloakAdmin { /// Parameters: /// /// - `realm`: realm name (not id!) + /// - `include_global_policies` /// /// Resource: `Realms Admin` /// /// `GET /admin/realms/{realm}/client-policies/policies` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_client_policies_policies_get( &self, realm: &str, + include_global_policies: Option, ) -> Result { - let builder = self + let mut builder = self .client .get(&format!( "{}/admin/realms/{realm}/client-policies/policies", self.url )) .bearer_auth(self.token_supplier.get(&self.url).await?); + if let Some(v) = include_global_policies { + builder = builder.query(&[("include-global-policies", v)]); + } let response = builder.send().await?; Ok(error_check(response).await?.json().await?) } @@ -5544,7 +5679,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/client-policies/policies` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_client_policies_policies_put( &self, @@ -5573,7 +5708,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-policies/profiles` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_client_policies_profiles_get( &self, @@ -5603,7 +5738,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/client-policies/profiles` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_client_policies_profiles_put( &self, @@ -5633,7 +5768,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-session-stats` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_client_session_stats_get( &self, @@ -5650,6 +5785,58 @@ impl KeycloakAdmin { Ok(error_check(response).await?.json().await?) } + /// List all client types available in the current realm + /// + /// Parameters: + /// + /// - `realm`: realm name (not id!) + /// + /// Resource: `Realms Admin` + /// + /// `GET /admin/realms/{realm}/client-types` + /// + /// Documentation: + #[cfg(feature = "tag-realms-admin")] + pub async fn realm_client_types_get( + &self, + realm: &str, + ) -> Result { + let builder = self + .client + .get(&format!("{}/admin/realms/{realm}/client-types", self.url)) + .bearer_auth(self.token_supplier.get(&self.url).await?); + let response = builder.send().await?; + Ok(error_check(response).await?.json().await?) + } + + /// Update a client type + /// + /// Parameters: + /// + /// - `realm`: realm name (not id!) + /// - `body` + /// + /// Resource: `Realms Admin` + /// + /// `PUT /admin/realms/{realm}/client-types` + /// + /// Documentation: + #[cfg(feature = "tag-realms-admin")] + pub async fn realm_client_types_put( + &self, + realm: &str, + body: ClientTypesRepresentation, + ) -> Result<(), KeycloakError> { + let builder = self + .client + .put(&format!("{}/admin/realms/{realm}/client-types", self.url)) + .json(&body) + .bearer_auth(self.token_supplier.get(&self.url).await?); + let response = builder.send().await?; + error_check(response).await?; + Ok(()) + } + /// Parameters: /// /// - `realm`: realm name (not id!) @@ -5658,7 +5845,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/credential-registrators` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_credential_registrators_get( &self, @@ -5685,7 +5872,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/default-default-client-scopes` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_default_default_client_scopes_get( &self, @@ -5711,7 +5898,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/default-default-client-scopes/{client_scope_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/default-default-client-scopes/{clientScopeId}` #[cfg(feature = "tag-realms-admin")] @@ -5742,7 +5929,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/default-default-client-scopes/{client_scope_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/default-default-client-scopes/{clientScopeId}` #[cfg(feature = "tag-realms-admin")] @@ -5773,7 +5960,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/default-groups` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_default_groups_get( &self, @@ -5796,7 +5983,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/default-groups/{group_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/default-groups/{groupId}` #[cfg(feature = "tag-realms-admin")] @@ -5827,7 +6014,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/default-groups/{group_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/default-groups/{groupId}` #[cfg(feature = "tag-realms-admin")] @@ -5858,7 +6045,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/default-optional-client-scopes` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_default_optional_client_scopes_get( &self, @@ -5884,7 +6071,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/default-optional-client-scopes/{client_scope_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/default-optional-client-scopes/{clientScopeId}` #[cfg(feature = "tag-realms-admin")] @@ -5915,7 +6102,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/default-optional-client-scopes/{client_scope_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/default-optional-client-scopes/{clientScopeId}` #[cfg(feature = "tag-realms-admin")] @@ -5954,7 +6141,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/events` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] #[allow(clippy::too_many_arguments)] pub async fn realm_events_get( @@ -6011,7 +6198,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/events` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_events_delete(&self, realm: &str) -> Result<(), KeycloakError> { let builder = self @@ -6033,7 +6220,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/events/config` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_events_config_get( &self, @@ -6056,7 +6243,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/events/config` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_events_config_put( &self, @@ -6082,7 +6269,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/group-by-path/{path}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_group_by_path_with_path_get( &self, @@ -6108,7 +6295,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/localization` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_localization_get( &self, @@ -6132,7 +6319,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/localization/{locale}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_localization_with_locale_get( &self, @@ -6168,7 +6355,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/localization/{locale}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_localization_with_locale_post( &self, @@ -6197,7 +6384,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/localization/{locale}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_localization_with_locale_delete( &self, @@ -6226,7 +6413,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/localization/{locale}/{key}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_localization_with_locale_with_key_get( &self, @@ -6256,7 +6443,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/localization/{locale}/{key}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_localization_with_locale_with_key_put( &self, @@ -6288,7 +6475,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/localization/{locale}/{key}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_localization_with_locale_with_key_delete( &self, @@ -6318,7 +6505,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/logout-all` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_logout_all_post( &self, @@ -6346,7 +6533,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/partial-export` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_partial_export_post( &self, @@ -6381,7 +6568,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/partialImport` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_partial_import_post( &self, @@ -6407,7 +6594,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/push-revocation` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_push_revocation_post( &self, @@ -6436,7 +6623,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/sessions/{session}` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_sessions_with_session_delete( &self, @@ -6472,7 +6659,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/testSMTPConnection` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] #[deprecated] pub async fn realm_test_smtp_connection_post( @@ -6500,7 +6687,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/users-management-permissions` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_users_management_permissions_get( &self, @@ -6526,7 +6713,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/users-management-permissions` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-realms-admin")] pub async fn realm_users_management_permissions_put( &self, @@ -6558,7 +6745,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/groups/{group_id}/role-mappings` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/groups/{group-id}/role-mappings` #[cfg(feature = "tag-role-mapper")] @@ -6589,7 +6776,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/groups/{group_id}/role-mappings/realm` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/groups/{group-id}/role-mappings/realm` #[cfg(feature = "tag-role-mapper")] @@ -6623,7 +6810,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/groups/{group_id}/role-mappings/realm` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/groups/{group-id}/role-mappings/realm` #[cfg(feature = "tag-role-mapper")] @@ -6657,7 +6844,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/groups/{group_id}/role-mappings/realm` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/groups/{group-id}/role-mappings/realm` #[cfg(feature = "tag-role-mapper")] @@ -6691,7 +6878,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/groups/{group_id}/role-mappings/realm/available` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/groups/{group-id}/role-mappings/realm/available` #[cfg(feature = "tag-role-mapper")] @@ -6723,7 +6910,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/groups/{group_id}/role-mappings/realm/composite` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/groups/{group-id}/role-mappings/realm/composite` #[cfg(feature = "tag-role-mapper")] @@ -6758,7 +6945,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/users/{user_id}/role-mappings` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/users/{user-id}/role-mappings` #[cfg(feature = "tag-role-mapper")] @@ -6789,7 +6976,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/users/{user_id}/role-mappings/realm` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/users/{user-id}/role-mappings/realm` #[cfg(feature = "tag-role-mapper")] @@ -6823,7 +7010,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/users/{user_id}/role-mappings/realm` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/users/{user-id}/role-mappings/realm` #[cfg(feature = "tag-role-mapper")] @@ -6857,7 +7044,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/users/{user_id}/role-mappings/realm` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/users/{user-id}/role-mappings/realm` #[cfg(feature = "tag-role-mapper")] @@ -6891,7 +7078,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/users/{user_id}/role-mappings/realm/available` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/users/{user-id}/role-mappings/realm/available` #[cfg(feature = "tag-role-mapper")] @@ -6923,7 +7110,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/users/{user_id}/role-mappings/realm/composite` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/users/{user-id}/role-mappings/realm/composite` #[cfg(feature = "tag-role-mapper")] @@ -6964,7 +7151,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/roles` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/roles` #[cfg(feature = "tag-roles")] @@ -7014,7 +7201,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/clients/{client_uuid}/roles` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/clients/{client-uuid}/roles` #[cfg(feature = "tag-roles")] @@ -7048,7 +7235,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/roles/{role_name}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name}` #[cfg(feature = "tag-roles")] @@ -7082,7 +7269,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/clients/{client_uuid}/roles/{role_name}` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name}` #[cfg(feature = "tag-roles")] @@ -7118,7 +7305,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/clients/{client_uuid}/roles/{role_name}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name}` #[cfg(feature = "tag-roles")] @@ -7152,7 +7339,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/roles/{role_name}/composites` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name}/composites` #[cfg(feature = "tag-roles")] @@ -7188,7 +7375,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/clients/{client_uuid}/roles/{role_name}/composites` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name}/composites` #[cfg(feature = "tag-roles")] @@ -7224,7 +7411,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/clients/{client_uuid}/roles/{role_name}/composites` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name}/composites` #[cfg(feature = "tag-roles")] @@ -7260,7 +7447,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/roles/{role_name}/composites/clients/{client_uuid}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name}/composites/clients/{client-uuid}` #[cfg(feature = "tag-roles")] @@ -7293,7 +7480,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/roles/{role_name}/composites/realm` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name}/composites/realm` #[cfg(feature = "tag-roles")] @@ -7329,7 +7516,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/roles/{role_name}/groups` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name}/groups` #[cfg(feature = "tag-roles")] @@ -7374,7 +7561,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/roles/{role_name}/management/permissions` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name}/management/permissions` #[cfg(feature = "tag-roles")] @@ -7408,7 +7595,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/clients/{client_uuid}/roles/{role_name}/management/permissions` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name}/management/permissions` #[cfg(feature = "tag-roles")] @@ -7445,7 +7632,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/roles/{role_name}/users` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/roles/{role-name}/users` #[cfg(feature = "tag-roles")] @@ -7488,7 +7675,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/roles` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-roles")] pub async fn realm_roles_get( &self, @@ -7531,7 +7718,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/roles` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-roles")] pub async fn realm_roles_post( &self, @@ -7558,7 +7745,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/roles/{role_name}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/roles/{role-name}` #[cfg(feature = "tag-roles")] @@ -7590,7 +7777,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/roles/{role_name}` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/roles/{role-name}` #[cfg(feature = "tag-roles")] @@ -7624,7 +7811,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/roles/{role_name}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/roles/{role-name}` #[cfg(feature = "tag-roles")] @@ -7656,7 +7843,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/roles/{role_name}/composites` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/roles/{role-name}/composites` #[cfg(feature = "tag-roles")] @@ -7690,7 +7877,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/roles/{role_name}/composites` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/roles/{role-name}/composites` #[cfg(feature = "tag-roles")] @@ -7724,7 +7911,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/roles/{role_name}/composites` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/roles/{role-name}/composites` #[cfg(feature = "tag-roles")] @@ -7759,7 +7946,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/roles/{role_name}/composites/clients/{client_uuid}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/roles/{role-name}/composites/clients/{client-uuid}` #[cfg(feature = "tag-roles")] @@ -7791,7 +7978,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/roles/{role_name}/composites/realm` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/roles/{role-name}/composites/realm` #[cfg(feature = "tag-roles")] @@ -7825,7 +8012,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/roles/{role_name}/groups` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/roles/{role-name}/groups` #[cfg(feature = "tag-roles")] @@ -7868,7 +8055,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/roles/{role_name}/management/permissions` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/roles/{role-name}/management/permissions` #[cfg(feature = "tag-roles")] @@ -7900,7 +8087,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/roles/{role_name}/management/permissions` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/roles/{role-name}/management/permissions` #[cfg(feature = "tag-roles")] @@ -7935,7 +8122,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/roles/{role_name}/users` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/roles/{role-name}/users` #[cfg(feature = "tag-roles")] @@ -7976,7 +8163,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/roles-by-id/{role_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/roles-by-id/{role-id}` #[cfg(feature = "tag-roles-by-id")] @@ -8008,7 +8195,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/roles-by-id/{role_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/roles-by-id/{role-id}` #[cfg(feature = "tag-roles-by-id")] @@ -8042,7 +8229,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/roles-by-id/{role_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/roles-by-id/{role-id}` #[cfg(feature = "tag-roles-by-id")] @@ -8077,7 +8264,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/roles-by-id/{role_id}/composites` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/roles-by-id/{role-id}/composites` #[cfg(feature = "tag-roles-by-id")] @@ -8123,7 +8310,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/roles-by-id/{role_id}/composites` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/roles-by-id/{role-id}/composites` #[cfg(feature = "tag-roles-by-id")] @@ -8157,7 +8344,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/roles-by-id/{role_id}/composites` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/roles-by-id/{role-id}/composites` #[cfg(feature = "tag-roles-by-id")] @@ -8192,7 +8379,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/roles-by-id/{role_id}/composites/clients/{client_uuid}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/roles-by-id/{role-id}/composites/clients/{clientUuid}` #[cfg(feature = "tag-roles-by-id")] @@ -8224,7 +8411,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/roles-by-id/{role_id}/composites/realm` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/roles-by-id/{role-id}/composites/realm` #[cfg(feature = "tag-roles-by-id")] @@ -8255,7 +8442,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/roles-by-id/{role_id}/management/permissions` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/roles-by-id/{role-id}/management/permissions` #[cfg(feature = "tag-roles-by-id")] @@ -8287,7 +8474,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/roles-by-id/{role_id}/management/permissions` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/roles-by-id/{role-id}/management/permissions` #[cfg(feature = "tag-roles-by-id")] @@ -8322,7 +8509,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-scopes/{client_scope_id}/scope-mappings` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings` #[cfg(feature = "tag-scope-mappings")] @@ -8355,7 +8542,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-scopes/{client_scope_id}/scope-mappings/clients/{client}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/clients/{client}` #[cfg(feature = "tag-scope-mappings")] @@ -8391,7 +8578,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/client-scopes/{client_scope_id}/scope-mappings/clients/{client}` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/clients/{client}` #[cfg(feature = "tag-scope-mappings")] @@ -8427,7 +8614,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/client-scopes/{client_scope_id}/scope-mappings/clients/{client}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/clients/{client}` #[cfg(feature = "tag-scope-mappings")] @@ -8463,7 +8650,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-scopes/{client_scope_id}/scope-mappings/clients/{client}/available` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/clients/{client}/available` #[cfg(feature = "tag-scope-mappings")] @@ -8497,7 +8684,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-scopes/{client_scope_id}/scope-mappings/clients/{client}/composite` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/clients/{client}/composite` #[cfg(feature = "tag-scope-mappings")] @@ -8533,7 +8720,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-scopes/{client_scope_id}/scope-mappings/realm` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/realm` #[cfg(feature = "tag-scope-mappings")] @@ -8567,7 +8754,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/client-scopes/{client_scope_id}/scope-mappings/realm` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/realm` #[cfg(feature = "tag-scope-mappings")] @@ -8601,7 +8788,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/client-scopes/{client_scope_id}/scope-mappings/realm` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/realm` #[cfg(feature = "tag-scope-mappings")] @@ -8635,7 +8822,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-scopes/{client_scope_id}/scope-mappings/realm/available` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/realm/available` #[cfg(feature = "tag-scope-mappings")] @@ -8667,7 +8854,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-scopes/{client_scope_id}/scope-mappings/realm/composite` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-scopes/{client-scope-id}/scope-mappings/realm/composite` #[cfg(feature = "tag-scope-mappings")] @@ -8702,7 +8889,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-templates/{client_scope_id}/scope-mappings` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings` #[cfg(feature = "tag-scope-mappings")] @@ -8735,7 +8922,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-templates/{client_scope_id}/scope-mappings/clients/{client}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/clients/{client}` #[cfg(feature = "tag-scope-mappings")] @@ -8771,7 +8958,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/client-templates/{client_scope_id}/scope-mappings/clients/{client}` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/clients/{client}` #[cfg(feature = "tag-scope-mappings")] @@ -8807,7 +8994,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/client-templates/{client_scope_id}/scope-mappings/clients/{client}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/clients/{client}` #[cfg(feature = "tag-scope-mappings")] @@ -8843,7 +9030,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-templates/{client_scope_id}/scope-mappings/clients/{client}/available` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/clients/{client}/available` #[cfg(feature = "tag-scope-mappings")] @@ -8877,7 +9064,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-templates/{client_scope_id}/scope-mappings/clients/{client}/composite` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/clients/{client}/composite` #[cfg(feature = "tag-scope-mappings")] @@ -8913,7 +9100,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-templates/{client_scope_id}/scope-mappings/realm` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/realm` #[cfg(feature = "tag-scope-mappings")] @@ -8947,7 +9134,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/client-templates/{client_scope_id}/scope-mappings/realm` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/realm` #[cfg(feature = "tag-scope-mappings")] @@ -8981,7 +9168,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/client-templates/{client_scope_id}/scope-mappings/realm` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/realm` #[cfg(feature = "tag-scope-mappings")] @@ -9015,7 +9202,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-templates/{client_scope_id}/scope-mappings/realm/available` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/realm/available` #[cfg(feature = "tag-scope-mappings")] @@ -9047,7 +9234,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/client-templates/{client_scope_id}/scope-mappings/realm/composite` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/client-templates/{client-scope-id}/scope-mappings/realm/composite` #[cfg(feature = "tag-scope-mappings")] @@ -9082,7 +9269,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/scope-mappings` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/scope-mappings` #[cfg(feature = "tag-scope-mappings")] @@ -9115,7 +9302,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/scope-mappings/clients/{client}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/clients/{client}` #[cfg(feature = "tag-scope-mappings")] @@ -9151,7 +9338,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/clients/{client_uuid}/scope-mappings/clients/{client}` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/clients/{client}` #[cfg(feature = "tag-scope-mappings")] @@ -9187,7 +9374,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/clients/{client_uuid}/scope-mappings/clients/{client}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/clients/{client}` #[cfg(feature = "tag-scope-mappings")] @@ -9223,7 +9410,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/scope-mappings/clients/{client}/available` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/clients/{client}/available` #[cfg(feature = "tag-scope-mappings")] @@ -9257,7 +9444,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/scope-mappings/clients/{client}/composite` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/clients/{client}/composite` #[cfg(feature = "tag-scope-mappings")] @@ -9293,7 +9480,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/scope-mappings/realm` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/realm` #[cfg(feature = "tag-scope-mappings")] @@ -9327,7 +9514,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/clients/{client_uuid}/scope-mappings/realm` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/realm` #[cfg(feature = "tag-scope-mappings")] @@ -9361,7 +9548,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/clients/{client_uuid}/scope-mappings/realm` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/realm` #[cfg(feature = "tag-scope-mappings")] @@ -9395,7 +9582,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/scope-mappings/realm/available` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/realm/available` #[cfg(feature = "tag-scope-mappings")] @@ -9427,7 +9614,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/clients/{client_uuid}/scope-mappings/realm/composite` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/clients/{client-uuid}/scope-mappings/realm/composite` #[cfg(feature = "tag-scope-mappings")] @@ -9477,7 +9664,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/users` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-users")] #[allow(clippy::too_many_arguments)] pub async fn realm_users_get( @@ -9561,7 +9748,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/users` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-users")] pub async fn realm_users_post( &self, @@ -9595,7 +9782,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/users/count` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-users")] #[allow(clippy::too_many_arguments)] pub async fn realm_users_count_get( @@ -9650,7 +9837,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/users/profile` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-users")] pub async fn realm_users_profile_get(&self, realm: &str) -> Result { let builder = self @@ -9670,7 +9857,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/users/profile` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-users")] pub async fn realm_users_profile_put( &self, @@ -9694,7 +9881,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/users/profile/metadata` /// - /// Documentation: + /// Documentation: #[cfg(feature = "tag-users")] pub async fn realm_users_profile_metadata_get( &self, @@ -9723,7 +9910,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/users/{user_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/users/{user-id}` #[cfg(feature = "tag-users")] @@ -9759,7 +9946,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/users/{user_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/users/{user-id}` #[cfg(feature = "tag-users")] @@ -9793,7 +9980,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/users/{user_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/users/{user-id}` #[cfg(feature = "tag-users")] @@ -9825,7 +10012,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/users/{user_id}/configured-user-storage-credential-types` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/users/{user-id}/configured-user-storage-credential-types` #[cfg(feature = "tag-users")] @@ -9856,7 +10043,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/users/{user_id}/consents` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/users/{user-id}/consents` #[cfg(feature = "tag-users")] @@ -9888,7 +10075,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/users/{user_id}/consents/{client}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/users/{user-id}/consents/{client}` #[cfg(feature = "tag-users")] @@ -9919,7 +10106,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/users/{user_id}/credentials` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/users/{user-id}/credentials` #[cfg(feature = "tag-users")] @@ -9951,7 +10138,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/users/{user_id}/credentials/{credential_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/users/{user-id}/credentials/{credentialId}` #[cfg(feature = "tag-users")] @@ -9988,7 +10175,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/users/{user_id}/credentials/{credential_id}/moveAfter/{new_previous_credential_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/users/{user-id}/credentials/{credentialId}/moveAfter/{newPreviousCredentialId}` #[cfg(feature = "tag-users")] @@ -10024,7 +10211,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/users/{user_id}/credentials/{credential_id}/moveToFirst` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/users/{user-id}/credentials/{credentialId}/moveToFirst` #[cfg(feature = "tag-users")] @@ -10058,7 +10245,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/users/{user_id}/credentials/{credential_id}/userLabel` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/users/{user-id}/credentials/{credentialId}/userLabel` #[cfg(feature = "tag-users")] @@ -10094,7 +10281,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/users/{user_id}/disable-credential-types` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/users/{user-id}/disable-credential-types` #[cfg(feature = "tag-users")] @@ -10132,7 +10319,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/users/{user_id}/execute-actions-email` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/users/{user-id}/execute-actions-email` #[cfg(feature = "tag-users")] @@ -10178,7 +10365,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/users/{user_id}/federated-identity` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/users/{user-id}/federated-identity` #[cfg(feature = "tag-users")] @@ -10212,7 +10399,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/users/{user_id}/federated-identity/{provider}` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/users/{user-id}/federated-identity/{provider}` #[cfg(feature = "tag-users")] @@ -10245,7 +10432,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/users/{user_id}/federated-identity/{provider}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/users/{user-id}/federated-identity/{provider}` #[cfg(feature = "tag-users")] @@ -10280,7 +10467,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/users/{user_id}/groups` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/users/{user-id}/groups` #[cfg(feature = "tag-users")] @@ -10326,7 +10513,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/users/{user_id}/groups/count` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/users/{user-id}/groups/count` #[cfg(feature = "tag-users")] @@ -10360,7 +10547,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/users/{user_id}/groups/{group_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/users/{user-id}/groups/{groupId}` #[cfg(feature = "tag-users")] @@ -10393,7 +10580,7 @@ impl KeycloakAdmin { /// /// `DELETE /admin/realms/{realm}/users/{user_id}/groups/{group_id}` /// - /// Documentation: + /// Documentation: /// /// REST method: `DELETE /admin/realms/{realm}/users/{user-id}/groups/{groupId}` #[cfg(feature = "tag-users")] @@ -10426,7 +10613,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/users/{user_id}/impersonation` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/users/{user-id}/impersonation` #[cfg(feature = "tag-users")] @@ -10459,7 +10646,7 @@ impl KeycloakAdmin { /// /// `POST /admin/realms/{realm}/users/{user_id}/logout` /// - /// Documentation: + /// Documentation: /// /// REST method: `POST /admin/realms/{realm}/users/{user-id}/logout` #[cfg(feature = "tag-users")] @@ -10491,7 +10678,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/users/{user_id}/offline-sessions/{client_uuid}` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/users/{user-id}/offline-sessions/{clientUuid}` #[cfg(feature = "tag-users")] @@ -10524,7 +10711,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/users/{user_id}/reset-password` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/users/{user-id}/reset-password` #[cfg(feature = "tag-users")] @@ -10560,7 +10747,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/users/{user_id}/reset-password-email` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/users/{user-id}/reset-password-email` #[cfg(feature = "tag-users")] @@ -10605,7 +10792,7 @@ impl KeycloakAdmin { /// /// `PUT /admin/realms/{realm}/users/{user_id}/send-verify-email` /// - /// Documentation: + /// Documentation: /// /// REST method: `PUT /admin/realms/{realm}/users/{user-id}/send-verify-email` #[cfg(feature = "tag-users")] @@ -10650,7 +10837,7 @@ impl KeycloakAdmin { /// /// `GET /admin/realms/{realm}/users/{user_id}/sessions` /// - /// Documentation: + /// Documentation: /// /// REST method: `GET /admin/realms/{realm}/users/{user-id}/sessions` #[cfg(feature = "tag-users")] @@ -10669,6 +10856,35 @@ impl KeycloakAdmin { let response = builder.send().await?; Ok(error_check(response).await?.json().await?) } + + /// Parameters: + /// + /// - `realm`: realm name (not id!) + /// - `user_id` + /// + /// Resource: `Users` + /// + /// `GET /admin/realms/{realm}/users/{user_id}/unmanagedAttributes` + /// + /// Documentation: + /// + /// REST method: `GET /admin/realms/{realm}/users/{user-id}/unmanagedAttributes` + #[cfg(feature = "tag-users")] + pub async fn realm_users_with_user_id_unmanaged_attributes_get( + &self, + realm: &str, + user_id: &str, + ) -> Result>, KeycloakError> { + let builder = self + .client + .get(&format!( + "{}/admin/realms/{realm}/users/{user_id}/unmanagedAttributes", + self.url + )) + .bearer_auth(self.token_supplier.get(&self.url).await?); + let response = builder.send().await?; + Ok(error_check(response).await?.json().await?) + } } // not all paths processed // left 22 diff --git a/src/types.rs b/src/types.rs index 71ac16a..3b545ab 100644 --- a/src/types.rs +++ b/src/types.rs @@ -63,9 +63,6 @@ pub struct AccessToken { #[serde(rename = "allowed-origins")] pub allowed_origins: Option>, pub at_hash: Option, - #[deprecated] - #[serde(rename = "authTime")] - pub auth_time_: Option, pub auth_time: Option, pub authorization: Option, pub azp: Option, @@ -99,7 +96,6 @@ pub struct AccessToken { pub resource_access: Option>, pub s_hash: Option, pub scope: Option, - pub session_state: Option, pub sid: Option, pub sub: Option, #[serde(rename = "trusted-certs")] @@ -187,6 +183,8 @@ pub struct ApplicationRepresentation { pub service_accounts_enabled: Option, pub standard_flow_enabled: Option, pub surrogate_auth_required: Option, + #[serde(rename = "type")] + pub type_: Option, #[deprecated] pub use_template_config: Option, #[deprecated] @@ -238,6 +236,7 @@ pub struct AuthenticationExecutionInfoRepresentation { pub id: Option, pub index: Option, pub level: Option, + pub priority: Option, pub provider_id: Option, pub requirement: Option, pub requirement_choices: Option>, @@ -361,7 +360,9 @@ pub struct ClientMappingsRepresentation { #[skip_serializing_none] #[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)] #[cfg_attr(feature = "schemars", derive(JsonSchema))] +#[serde(rename_all = "camelCase")] pub struct ClientPoliciesRepresentation { + pub global_policies: Option>, pub policies: Option>, } @@ -457,6 +458,8 @@ pub struct ClientRepresentation { pub service_accounts_enabled: Option, pub standard_flow_enabled: Option, pub surrogate_auth_required: Option, + #[serde(rename = "type")] + pub type_: Option, #[deprecated] pub use_template_config: Option, #[deprecated] @@ -502,6 +505,25 @@ pub struct ClientTemplateRepresentation { pub standard_flow_enabled: Option, } +#[skip_serializing_none] +#[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)] +#[cfg_attr(feature = "schemars", derive(JsonSchema))] +pub struct ClientTypeRepresentation { + pub config: Option>, + pub name: Option, + pub provider: Option, +} + +#[skip_serializing_none] +#[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)] +#[cfg_attr(feature = "schemars", derive(JsonSchema))] +pub struct ClientTypesRepresentation { + #[serde(rename = "client-types")] + pub client_types: Option>, + #[serde(rename = "global-client-types")] + pub global_client_types: Option>, +} + #[skip_serializing_none] #[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)] #[cfg_attr(feature = "schemars", derive(JsonSchema))] @@ -709,9 +731,6 @@ pub struct IDToken { pub acr: Option, pub address: Option, pub at_hash: Option, - #[deprecated] - #[serde(rename = "authTime")] - pub auth_time_: Option, pub auth_time: Option, pub azp: Option, pub birthdate: Option, @@ -740,7 +759,6 @@ pub struct IDToken { pub preferred_username: Option, pub profile: Option, pub s_hash: Option, - pub session_state: Option, pub sid: Option, pub sub: Option, pub typ: Option, @@ -914,8 +932,6 @@ pub type MultivaluedHashMapStringComponentExportRepresentation = pub type MultivaluedHashMapStringString = TypeMap>; -pub type MultivaluedMapStringString = TypeMap>; - #[deprecated] #[skip_serializing_none] #[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)] @@ -966,6 +982,8 @@ pub struct OAuthClientRepresentation { pub service_accounts_enabled: Option, pub standard_flow_enabled: Option, pub surrogate_auth_required: Option, + #[serde(rename = "type")] + pub type_: Option, #[deprecated] pub use_template_config: Option, #[deprecated] @@ -975,6 +993,29 @@ pub struct OAuthClientRepresentation { pub web_origins: Option>, } +#[skip_serializing_none] +#[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)] +#[cfg_attr(feature = "schemars", derive(JsonSchema))] +pub struct OrganizationDomainRepresentation { + pub name: Option, + pub verified: Option, +} + +#[skip_serializing_none] +#[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)] +#[cfg_attr(feature = "schemars", derive(JsonSchema))] +#[serde(rename_all = "camelCase")] +pub struct OrganizationRepresentation { + pub attributes: Option>>, + pub description: Option, + pub domains: Option>, + pub enabled: Option, + pub id: Option, + pub identity_providers: Option>, + pub members: Option>, + pub name: Option, +} + #[skip_serializing_none] #[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)] #[cfg_attr(feature = "schemars", derive(JsonSchema))] @@ -1006,15 +1047,6 @@ pub struct PathConfig { pub type_: Option, } -#[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)] -#[cfg_attr(feature = "schemars", derive(JsonSchema))] -#[serde(rename_all = "camelCase")] -pub struct PathSegment { - pub matrix_parameters: Option, - pub path: Option, -} - #[skip_serializing_none] #[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)] #[cfg_attr(feature = "schemars", derive(JsonSchema))] @@ -1125,6 +1157,14 @@ pub struct PolicyResultRepresentation { pub status: Option, } +#[skip_serializing_none] +#[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)] +#[cfg_attr(feature = "schemars", derive(JsonSchema))] +pub struct PropertyConfig { + pub applicable: Option, + pub value: Option, +} + #[skip_serializing_none] #[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)] #[cfg_attr(feature = "schemars", derive(JsonSchema))] @@ -1270,6 +1310,8 @@ pub struct RealmRepresentation { pub offline_session_idle_timeout: Option, pub offline_session_max_lifespan: Option, pub offline_session_max_lifespan_enabled: Option, + pub organizations: Option>, + pub organizations_enabled: Option, pub otp_policy_algorithm: Option, pub otp_policy_code_reusable: Option, pub otp_policy_digits: Option, @@ -1349,6 +1391,20 @@ pub struct RealmRepresentation { pub web_authn_policy_user_verification_requirement: Option, } +#[skip_serializing_none] +#[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)] +#[cfg_attr(feature = "schemars", derive(JsonSchema))] +pub struct RequiredActionConfigInfoRepresentation { + pub properties: Option>, +} + +#[skip_serializing_none] +#[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)] +#[cfg_attr(feature = "schemars", derive(JsonSchema))] +pub struct RequiredActionConfigRepresentation { + pub config: Option>, +} + #[skip_serializing_none] #[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)] #[cfg_attr(feature = "schemars", derive(JsonSchema))] @@ -1675,6 +1731,7 @@ pub struct UserSessionRepresentation { pub last_access: Option, pub remember_me: Option, pub start: Option, + pub transient_user: Option, pub user_id: Option, pub username: Option, }