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) { // ... }}Parameters
builderAuthenticationBuilder The Authentication.AuthenticationBuilder to add services to.serviceName stringThe name of the service used to resolve the Keycloak server URL.realmstringThe realm of the Keycloak server to connect to.Remarks
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) { // ... }}Parameters
builderAuthenticationBuilder The Authentication.AuthenticationBuilder to add services to.serviceName stringThe name of the service used to resolve the Keycloak server URL.realmstringThe realm of the Keycloak server to connect to.authenticationScheme stringThe authentication scheme name. Default is "Bearer".Remarks
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) { // ... }}Parameters
builderAuthenticationBuilder The Authentication.AuthenticationBuilder to add services to.serviceName stringThe name of the service used to resolve the Keycloak server URL.realmstringThe realm of the Keycloak server to connect to.configureOptions Action<JwtBearerOptions> An optional action to configure the JwtBearer.JwtBearerOptions .Remarks
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) { // ... }}Parameters
builderAuthenticationBuilder The Authentication.AuthenticationBuilder to add services to.serviceName stringThe name of the service used to resolve the Keycloak server URL.realmstringThe realm of the Keycloak server to connect to.authenticationScheme stringThe authentication scheme name. Default is "Bearer".configureOptions Action<JwtBearerOptions> An action to configure the JwtBearer.JwtBearerOptions .Remarks
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) { // ... }}Parameters
builderAuthenticationBuilder The Authentication.AuthenticationBuilder to add services to.serviceName stringThe name of the service used to resolve the Keycloak server URL.realmstringThe realm of the Keycloak server to connect to.Remarks
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) { // ... }}Parameters
builderAuthenticationBuilder The Authentication.AuthenticationBuilder to add services to.serviceName stringThe name of the service used to resolve the Keycloak server URL.realmstringThe realm of the Keycloak server to connect to.authenticationScheme stringThe OpenID Connect authentication scheme name. Default is "OpenIdConnect".Remarks
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) { // ... }}Parameters
builderAuthenticationBuilder The Authentication.AuthenticationBuilder to add services to.serviceName stringThe name of the service used to resolve the Keycloak server URL.realmstringThe realm of the Keycloak server to connect to.configureOptions Action<OpenIdConnectOptions> An action to configure the OpenIdConnect.OpenIdConnectOptions .Remarks
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) { // ... }}Parameters
builderAuthenticationBuilder The Authentication.AuthenticationBuilder to add services to.serviceName stringThe name of the service used to resolve the Keycloak server URL.realmstringThe realm of the Keycloak server to connect to.authenticationScheme stringThe OpenID Connect authentication scheme name. Default is "OpenIdConnect".configureOptions Action<OpenIdConnectOptions> An action to configure the OpenIdConnect.OpenIdConnectOptions .Remarks
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".