Skip to content
Docs Try Aspire

AspireKeycloakExtensions Methods

Class Methods 8 members
Provides extension methods for registering Keycloak-related services in an Authentication.AuthenticationBuilder.
AddKeycloakJwtBearer(AuthenticationBuilder, string, string) Section titled AddKeycloakJwtBearer(AuthenticationBuilder, string, string) extension AuthenticationBuilder
Adds Keycloak JWT Bearer authentication to the application.
public static class AspireKeycloakExtensions
{
public static AuthenticationBuilder AddKeycloakJwtBearer(
this AuthenticationBuilder builder,
string serviceName,
string realm)
{
// ...
}
}
builder AuthenticationBuilder The Authentication.AuthenticationBuilder to add services to.
serviceName string The name of the service used to resolve the Keycloak server URL.
realm string The realm of the Keycloak server to connect to.
The serviceName is used to resolve the Keycloak server URL and is combined with the realm to form the authority URL. For example, if serviceName is "keycloak" and realm is "myrealm", the authority URL will be "https+http://keycloak/realms/myrealm".
AddKeycloakJwtBearer(AuthenticationBuilder, string, string, string) Section titled AddKeycloakJwtBearer(AuthenticationBuilder, string, string, string) extension AuthenticationBuilder
Adds Keycloak JWT Bearer authentication to the application.
public static class AspireKeycloakExtensions
{
public static AuthenticationBuilder AddKeycloakJwtBearer(
this AuthenticationBuilder builder,
string serviceName,
string realm,
string authenticationScheme)
{
// ...
}
}
builder AuthenticationBuilder The Authentication.AuthenticationBuilder to add services to.
serviceName string The name of the service used to resolve the Keycloak server URL.
realm string The realm of the Keycloak server to connect to.
authenticationScheme string The authentication scheme name. Default is "Bearer".
The serviceName is used to resolve the Keycloak server URL and is combined with the realm to form the authority URL. For example, if serviceName is "keycloak" and realm is "myrealm", the authority URL will be "https+http://keycloak/realms/myrealm".
AddKeycloakJwtBearer(AuthenticationBuilder, string, string, Action<JwtBearerOptions>) Section titled AddKeycloakJwtBearer(AuthenticationBuilder, string, string, Action<JwtBearerOptions>) extension AuthenticationBuilder
Adds Keycloak JWT Bearer authentication to the application.
public static class AspireKeycloakExtensions
{
public static AuthenticationBuilder AddKeycloakJwtBearer(
this AuthenticationBuilder builder,
string serviceName,
string realm,
Action<JwtBearerOptions>? configureOptions)
{
// ...
}
}
builder AuthenticationBuilder The Authentication.AuthenticationBuilder to add services to.
serviceName string The name of the service used to resolve the Keycloak server URL.
realm string The realm of the Keycloak server to connect to.
configureOptions Action<JwtBearerOptions> An optional action to configure the JwtBearer.JwtBearerOptions.
The serviceName is used to resolve the Keycloak server URL and is combined with the realm to form the authority URL. For example, if serviceName is "keycloak" and realm is "myrealm", the authority URL will be "https+http://keycloak/realms/myrealm".
AddKeycloakJwtBearer(AuthenticationBuilder, string, string, string, Action<JwtBearerOptions>) Section titled AddKeycloakJwtBearer(AuthenticationBuilder, string, string, string, Action<JwtBearerOptions>) extension AuthenticationBuilder
Adds Keycloak JWT Bearer authentication to the application.
public static class AspireKeycloakExtensions
{
public static AuthenticationBuilder AddKeycloakJwtBearer(
this AuthenticationBuilder builder,
string serviceName,
string realm,
string authenticationScheme,
Action<JwtBearerOptions>? configureOptions)
{
// ...
}
}
builder AuthenticationBuilder The Authentication.AuthenticationBuilder to add services to.
serviceName string The name of the service used to resolve the Keycloak server URL.
realm string The realm of the Keycloak server to connect to.
authenticationScheme string The authentication scheme name. Default is "Bearer".
configureOptions Action<JwtBearerOptions> An action to configure the JwtBearer.JwtBearerOptions.
The serviceName is used to resolve the Keycloak server URL and is combined with the realm to form the authority URL. For example, if serviceName is "keycloak" and realm is "myrealm", the authority URL will be "https+http://keycloak/realms/myrealm".
AddKeycloakOpenIdConnect(AuthenticationBuilder, string, string) Section titled AddKeycloakOpenIdConnect(AuthenticationBuilder, string, string) extension AuthenticationBuilder
Adds Keycloak OpenID Connect authentication to the application.
public static class AspireKeycloakExtensions
{
public static AuthenticationBuilder AddKeycloakOpenIdConnect(
this AuthenticationBuilder builder,
string serviceName,
string realm)
{
// ...
}
}
builder AuthenticationBuilder The Authentication.AuthenticationBuilder to add services to.
serviceName string The name of the service used to resolve the Keycloak server URL.
realm string The realm of the Keycloak server to connect to.
The serviceName is used to resolve the Keycloak server URL and is combined with the realm to form the authority URL. For example, if serviceName is "keycloak" and realm is "myrealm", the authority URL will be "https+http://keycloak/realms/myrealm".
AddKeycloakOpenIdConnect(AuthenticationBuilder, string, string, string) Section titled AddKeycloakOpenIdConnect(AuthenticationBuilder, string, string, string) extension AuthenticationBuilder
Adds Keycloak OpenID Connect authentication to the application.
public static class AspireKeycloakExtensions
{
public static AuthenticationBuilder AddKeycloakOpenIdConnect(
this AuthenticationBuilder builder,
string serviceName,
string realm,
string authenticationScheme)
{
// ...
}
}
builder AuthenticationBuilder The Authentication.AuthenticationBuilder to add services to.
serviceName string The name of the service used to resolve the Keycloak server URL.
realm string The realm of the Keycloak server to connect to.
authenticationScheme string The OpenID Connect authentication scheme name. Default is "OpenIdConnect".
The serviceName is used to resolve the Keycloak server URL and is combined with the realm to form the authority URL. For example, if serviceName is "keycloak" and realm is "myrealm", the authority URL will be "https+http://keycloak/realms/myrealm".
AddKeycloakOpenIdConnect(AuthenticationBuilder, string, string, Action<OpenIdConnectOptions>) Section titled AddKeycloakOpenIdConnect(AuthenticationBuilder, string, string, Action<OpenIdConnectOptions>) extension AuthenticationBuilder
Adds Keycloak OpenID Connect authentication to the application.
public static class AspireKeycloakExtensions
{
public static AuthenticationBuilder AddKeycloakOpenIdConnect(
this AuthenticationBuilder builder,
string serviceName,
string realm,
Action<OpenIdConnectOptions>? configureOptions)
{
// ...
}
}
builder AuthenticationBuilder The Authentication.AuthenticationBuilder to add services to.
serviceName string The name of the service used to resolve the Keycloak server URL.
realm string The realm of the Keycloak server to connect to.
configureOptions Action<OpenIdConnectOptions> An action to configure the OpenIdConnect.OpenIdConnectOptions.
The serviceName is used to resolve the Keycloak server URL and is combined with the realm to form the authority URL. For example, if serviceName is "keycloak" and realm is "myrealm", the authority URL will be "https+http://keycloak/realms/myrealm".
AddKeycloakOpenIdConnect(AuthenticationBuilder, string, string, string, Action<OpenIdConnectOptions>) Section titled AddKeycloakOpenIdConnect(AuthenticationBuilder, string, string, string, Action<OpenIdConnectOptions>) extension AuthenticationBuilder
Adds Keycloak OpenID Connect authentication to the application.
public static class AspireKeycloakExtensions
{
public static AuthenticationBuilder AddKeycloakOpenIdConnect(
this AuthenticationBuilder builder,
string serviceName,
string realm,
string authenticationScheme,
Action<OpenIdConnectOptions>? configureOptions)
{
// ...
}
}
builder AuthenticationBuilder The Authentication.AuthenticationBuilder to add services to.
serviceName string The name of the service used to resolve the Keycloak server URL.
realm string The realm of the Keycloak server to connect to.
authenticationScheme string The OpenID Connect authentication scheme name. Default is "OpenIdConnect".
configureOptions Action<OpenIdConnectOptions> An action to configure the OpenIdConnect.OpenIdConnectOptions.
The serviceName is used to resolve the Keycloak server URL and is combined with the realm to form the authority URL. For example, if serviceName is "keycloak" and realm is "myrealm", the authority URL will be "https+http://keycloak/realms/myrealm".