#### [Abblix\.Oidc\.Server\.MinimalApi](https://www.abblix.com/en/docs/api/abblix-oidc-server-minimalapi 'index')
### [Abblix\.Oidc\.Server\.MinimalApi](https://www.abblix.com/en/docs/api/abblix-oidc-server-minimalapi/Abblix.Oidc.Server.MinimalApi 'Abblix\.Oidc\.Server\.MinimalApi')

## EndpointRouteBuilderExtensions Class

Maps the Abblix OpenID Connect server endpoints onto an ASP\.NET Core Minimal API route builder\.

```csharp
public static class EndpointRouteBuilderExtensions
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → EndpointRouteBuilderExtensions

### Remarks
This is the Minimal API counterpart of the MVC integration's `app.MapControllers()`\. Each endpoint is mapped
only when its [OidcEndpoints](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.OidcEndpoints 'Abblix\.Oidc\.Server\.Common\.Configuration\.OidcEndpoints') flag is enabled in [EnabledEndpoints](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.OidcOptions#Abblix.Oidc.Server.Common.Configuration.OidcOptions.EnabledEndpoints 'Abblix\.Oidc\.Server\.Common\.Configuration\.OidcOptions\.EnabledEndpoints'), reproducing
the MVC behavior where a disabled endpoint is never registered and therefore returns 404\.
### Methods

## EndpointRouteBuilderExtensions\.MapOidcEndpoints\(this IEndpointRouteBuilder, string\) Method {#Abblix.Oidc.Server.MinimalApi.EndpointRouteBuilderExtensions.MapOidcEndpoints(thisMicrosoft.AspNetCore.Routing.IEndpointRouteBuilder,string)}

Maps the enabled OpenID Connect and OAuth 2\.0 endpoints onto the route builder and returns it so the host can
continue configuring its own routes\.

```csharp
public static Microsoft.AspNetCore.Routing.RouteGroupBuilder MapOidcEndpoints(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string prefix="");
```
#### Parameters

###### `endpoints` [Microsoft\.AspNetCore\.Routing\.IEndpointRouteBuilder](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.routing.iendpointroutebuilder 'Microsoft\.AspNetCore\.Routing\.IEndpointRouteBuilder') {#Abblix.Oidc.Server.MinimalApi.EndpointRouteBuilderExtensions.MapOidcEndpoints(thisMicrosoft.AspNetCore.Routing.IEndpointRouteBuilder,string).endpoints}

The endpoint route builder to map the endpoints onto\.

###### `prefix` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.MinimalApi.EndpointRouteBuilderExtensions.MapOidcEndpoints(thisMicrosoft.AspNetCore.Routing.IEndpointRouteBuilder,string).prefix}

An optional route prefix to mount all OIDC endpoints under \(default: none\)\.

#### Returns
[Microsoft\.AspNetCore\.Routing\.RouteGroupBuilder](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.routing.routegroupbuilder 'Microsoft\.AspNetCore\.Routing\.RouteGroupBuilder')  
The [Microsoft\.AspNetCore\.Routing\.RouteGroupBuilder](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.routing.routegroupbuilder 'Microsoft\.AspNetCore\.Routing\.RouteGroupBuilder') the OIDC endpoints were mapped onto, so the host can apply
            cross\-cutting conventions \(rate limiting, host filtering, metadata\) to all of them at once\.
