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
builderTBuilderThe endpoint convention builder.
Returns
- TBuilder
The original convention builder parameter.
Type Parameters
TBuilderThe 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
builderTBuilderThe endpoint convention builder.
organizationstringThe organization alias, id, or route template (e.g., "{orgId}").
Returns
- TBuilder
The original convention builder parameter.
Type Parameters
TBuilderThe 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
builderTBuilderThe endpoint convention builder.
organizationstringThe organization alias, id, or template (e.g., "{X-Organization}").
resolverTypeTypeThe type of IParameterResolver to use.
Returns
- TBuilder
The original convention builder parameter.
Type Parameters
TBuilderThe 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
builderTBuilderThe endpoint convention builder.
organizationstringThe organization alias, id, or template (e.g., "{X-Organization}").
Returns
- TBuilder
The original convention builder parameter.
Type Parameters
TBuilderThe type of endpoint convention builder.
TResolverThe type of IParameterResolver to use.