-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add Kiota SDK for Admin API (#85)
* feat: Add Kiota SDK for Admin API * Add projects description * Add KeycloakAdminApiClient * Fix build warnings * Add docs
- Loading branch information
1 parent
cf22078
commit 5aae2c6
Showing
477 changed files
with
39,391 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Generated Client - Kiota <Badge type="warning" text="preview" /> | ||
|
||
This `KeycloakAdminApiClient` was generated using the *Kiota* library. | ||
|
||
> [!NOTE] | ||
> Kiota is a powerful command line tool developed by Microsoft that simplifies the process of generating API clients for calling any OpenAPI-described API. See [OpenAPI Support](/admin-rest-api/admin-api-openapi) for more details. | ||
```csharp | ||
/// <summary> | ||
/// Adds <see cref="KeycloakAdminApiClient"/> for Keycloak Admin API. | ||
/// </summary> | ||
/// <returns>The IHttpClientBuilder for further configuration.</returns> | ||
public static IHttpClientBuilder AddKeycloakAdminHttpClient( | ||
this IServiceCollection services, | ||
IConfiguration configuration, | ||
Action<HttpClient>? configureClient = default, | ||
string keycloakClientSectionName = KeycloakAdminClientOptions.Section | ||
); | ||
``` | ||
|
||
>[!TIP] | ||
> Kiota supports partial client generation, you can generate only the functionality you need. In this case, you can use source code of this library as an example. | ||
## Example | ||
|
||
This is an example of how to use `KeycloakAdminApiClient` together with [Access Token Management](/admin-rest-api/access-token). | ||
|
||
<<< @/../tests/Keycloak.AuthServices.IntegrationTests/AdminKiota/KeycloakRealmKiotaClientTests.cs#GetRealmAsyncKiota_RealmExists_Success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/Keycloak.AuthServices.Sdk.Kiota/Admin/AdminRequestBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// <auto-generated/> | ||
using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms; | ||
using Microsoft.Kiota.Abstractions; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using System; | ||
namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin { | ||
/// <summary> | ||
/// Builds and executes requests for operations under \admin | ||
/// </summary> | ||
public class AdminRequestBuilder : BaseRequestBuilder { | ||
/// <summary>The realms property</summary> | ||
public RealmsRequestBuilder Realms { get => | ||
new RealmsRequestBuilder(PathParameters, RequestAdapter); | ||
} | ||
/// <summary> | ||
/// Instantiates a new <see cref="AdminRequestBuilder"/> and sets the default values. | ||
/// </summary> | ||
/// <param name="pathParameters">Path parameters for the request</param> | ||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param> | ||
public AdminRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin", pathParameters) { | ||
} | ||
/// <summary> | ||
/// Instantiates a new <see cref="AdminRequestBuilder"/> and sets the default values. | ||
/// </summary> | ||
/// <param name="rawUrl">The raw URL to use for the request builder.</param> | ||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param> | ||
public AdminRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin", rawUrl) { | ||
} | ||
} | ||
} |
Oops, something went wrong.