Table of Contents

Class OrganizationEndpointConventionBuilderExtensions

Namespace
Keycloak.AuthServices.Authorization
Assembly
Keycloak.AuthServices.Authorization.dll

Organization authorization extension methods for IEndpointConventionBuilder.

public static class OrganizationEndpointConventionBuilderExtensions
Inheritance
OrganizationEndpointConventionBuilderExtensions
Inherited Members

Methods

RequireOrganizationMembership<TBuilder>(TBuilder)

Requires the user to be a member of any Keycloak organization.

public static TBuilder RequireOrganizationMembership<TBuilder>(this TBuilder builder) where TBuilder : IEndpointConventionBuilder

Parameters

builder TBuilder

The endpoint convention builder.

Returns

TBuilder

The original convention builder parameter.

Type Parameters

TBuilder

The type of endpoint convention builder.

RequireOrganizationMembership<TBuilder>(TBuilder, string)

Requires the user to be a member of the specified Keycloak organization. Supports {param} route templates that are resolved at evaluation time.

public static TBuilder RequireOrganizationMembership<TBuilder>(this TBuilder builder, string organization) where TBuilder : IEndpointConventionBuilder

Parameters

builder TBuilder

The endpoint convention builder.

organization string

The organization alias, id, or route template (e.g., "{orgId}").

Returns

TBuilder

The original convention builder parameter.

Type Parameters

TBuilder

The type of endpoint convention builder.

RequireOrganizationMembership<TBuilder>(TBuilder, string, Type)

Requires the user to be a member of the specified Keycloak organization, using a custom IParameterResolver to resolve the organization template parameter.

public static TBuilder RequireOrganizationMembership<TBuilder>(this TBuilder builder, string organization, Type resolverType) where TBuilder : IEndpointConventionBuilder

Parameters

builder TBuilder

The endpoint convention builder.

organization string

The organization alias, id, or template (e.g., "{X-Organization}").

resolverType Type

The type of IParameterResolver to use.

Returns

TBuilder

The original convention builder parameter.

Type Parameters

TBuilder

The type of endpoint convention builder.

RequireOrganizationMembership<TBuilder, TResolver>(TBuilder, string)

Requires the user to be a member of the specified Keycloak organization, using a custom IParameterResolver to resolve the organization template parameter.

public static TBuilder RequireOrganizationMembership<TBuilder, TResolver>(this TBuilder builder, string organization) where TBuilder : IEndpointConventionBuilder where TResolver : IParameterResolver

Parameters

builder TBuilder

The endpoint convention builder.

organization string

The organization alias, id, or template (e.g., "{X-Organization}").

Returns

TBuilder

The original convention builder parameter.

Type Parameters

TBuilder

The type of endpoint convention builder.

TResolver

The type of IParameterResolver to use.