Skip to content
DocsTry Aspire
DocsTry

AspireKeycloakExtensions Methods

ClassMethods8 members
Provides extension methods for registering Keycloak-related services in an Authentication.AuthenticationBuilder.
AddKeycloakJwtBearer(AuthenticationBuilder, string, string)Section titled AddKeycloakJwtBearer(AuthenticationBuilder, string, string)extensionAuthenticationBuilder
Adds Keycloak JWT Bearer authentication to the application.
public static class AspireKeycloakExtensions
{
public static AuthenticationBuilder AddKeycloakJwtBearer(
this AuthenticationBuilder builder,
string serviceName,
string realm)
{
// ...
}
}
builderAuthenticationBuilderThe Authentication.AuthenticationBuilder to add services to.
serviceNamestringThe name of the service used to resolve the Keycloak server URL.
realmstringThe 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)extensionAuthenticationBuilder
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)
{
// ...
}
}
builderAuthenticationBuilderThe Authentication.AuthenticationBuilder to add services to.
serviceNamestringThe name of the service used to resolve the Keycloak server URL.
realmstringThe realm of the Keycloak server to connect to.
authenticationSchemestringThe 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>)extensionAuthenticationBuilder
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)
{
// ...
}
}
builderAuthenticationBuilderThe Authentication.AuthenticationBuilder to add services to.
serviceNamestringThe name of the service used to resolve the Keycloak server URL.
realmstringThe realm of the Keycloak server to connect to.
configureOptionsAction<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>)extensionAuthenticationBuilder
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)
{
// ...
}
}
builderAuthenticationBuilderThe Authentication.AuthenticationBuilder to add services to.
serviceNamestringThe name of the service used to resolve the Keycloak server URL.
realmstringThe realm of the Keycloak server to connect to.
authenticationSchemestringThe authentication scheme name. Default is "Bearer".
configureOptionsAction<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)extensionAuthenticationBuilder
Adds Keycloak OpenID Connect authentication to the application.
public static class AspireKeycloakExtensions
{
public static AuthenticationBuilder AddKeycloakOpenIdConnect(
this AuthenticationBuilder builder,
string serviceName,
string realm)
{
// ...
}
}
builderAuthenticationBuilderThe Authentication.AuthenticationBuilder to add services to.
serviceNamestringThe name of the service used to resolve the Keycloak server URL.
realmstringThe 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)extensionAuthenticationBuilder
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)
{
// ...
}
}
builderAuthenticationBuilderThe Authentication.AuthenticationBuilder to add services to.
serviceNamestringThe name of the service used to resolve the Keycloak server URL.
realmstringThe realm of the Keycloak server to connect to.
authenticationSchemestringThe 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>)extensionAuthenticationBuilder
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)
{
// ...
}
}
builderAuthenticationBuilderThe Authentication.AuthenticationBuilder to add services to.
serviceNamestringThe name of the service used to resolve the Keycloak server URL.
realmstringThe realm of the Keycloak server to connect to.
configureOptionsAction<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>)extensionAuthenticationBuilder
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)
{
// ...
}
}
builderAuthenticationBuilderThe Authentication.AuthenticationBuilder to add services to.
serviceNamestringThe name of the service used to resolve the Keycloak server URL.
realmstringThe realm of the Keycloak server to connect to.
authenticationSchemestringThe OpenID Connect authentication scheme name. Default is "OpenIdConnect".
configureOptionsAction<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".