Share via


AspireKeycloakExtensions.AddKeycloakJwtBearer Method

Definition

Overloads

AddKeycloakJwtBearer(AuthenticationBuilder, String, String)

Adds Keycloak JWT Bearer authentication to the application.

AddKeycloakJwtBearer(AuthenticationBuilder, String, String, Action<JwtBearerOptions>)

Adds Keycloak JWT Bearer authentication to the application.

AddKeycloakJwtBearer(AuthenticationBuilder, String, String, String)

Adds Keycloak JWT Bearer authentication to the application.

AddKeycloakJwtBearer(AuthenticationBuilder, String, String, String, Action<JwtBearerOptions>)

Adds Keycloak JWT Bearer authentication to the application.

AddKeycloakJwtBearer(AuthenticationBuilder, String, String)

Source:
AspireKeycloakExtensions.cs
Source:
AspireKeycloakExtensions.cs

Adds Keycloak JWT Bearer authentication to the application.

public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddKeycloakJwtBearer (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string serviceName, string realm);
static member AddKeycloakJwtBearer : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * string * string -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddKeycloakJwtBearer (builder As AuthenticationBuilder, serviceName As String, realm As String) As AuthenticationBuilder

Parameters

builder
AuthenticationBuilder

The 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.

Returns

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".

Applies to

AddKeycloakJwtBearer(AuthenticationBuilder, String, String, Action<JwtBearerOptions>)

Source:
AspireKeycloakExtensions.cs
Source:
AspireKeycloakExtensions.cs

Adds Keycloak JWT Bearer authentication to the application.

public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddKeycloakJwtBearer (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string serviceName, string realm, Action<Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerOptions>? configureOptions);
static member AddKeycloakJwtBearer : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * string * string * Action<Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerOptions> -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddKeycloakJwtBearer (builder As AuthenticationBuilder, serviceName As String, realm As String, configureOptions As Action(Of JwtBearerOptions)) As AuthenticationBuilder

Parameters

builder
AuthenticationBuilder

The 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 JwtBearerOptions.

Returns

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".

Applies to

AddKeycloakJwtBearer(AuthenticationBuilder, String, String, String)

Source:
AspireKeycloakExtensions.cs
Source:
AspireKeycloakExtensions.cs

Adds Keycloak JWT Bearer authentication to the application.

public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddKeycloakJwtBearer (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string serviceName, string realm, string authenticationScheme);
static member AddKeycloakJwtBearer : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * string * string * string -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddKeycloakJwtBearer (builder As AuthenticationBuilder, serviceName As String, realm As String, authenticationScheme As String) As AuthenticationBuilder

Parameters

builder
AuthenticationBuilder

The 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".

Returns

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".

Applies to

AddKeycloakJwtBearer(AuthenticationBuilder, String, String, String, Action<JwtBearerOptions>)

Source:
AspireKeycloakExtensions.cs
Source:
AspireKeycloakExtensions.cs

Adds Keycloak JWT Bearer authentication to the application.

public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddKeycloakJwtBearer (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string serviceName, string realm, string authenticationScheme, Action<Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerOptions>? configureOptions);
static member AddKeycloakJwtBearer : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * string * string * string * Action<Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerOptions> -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddKeycloakJwtBearer (builder As AuthenticationBuilder, serviceName As String, realm As String, authenticationScheme As String, configureOptions As Action(Of JwtBearerOptions)) As AuthenticationBuilder

Parameters

builder
AuthenticationBuilder

The 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 JwtBearerOptions.

Returns

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".

Applies to