Skip to content

Commit

Permalink
Add missing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kirill-abblix committed Jul 2, 2024
1 parent f19d2ab commit fa670d7
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Abblix.Oidc.Server/Endpoints/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,30 @@ public static IServiceCollection AddAuthorizationEndpoint(this IServiceCollectio
.AddScoped<IAuthorizationRequestProcessor, AuthorizationRequestProcessor>();
}

/// <summary>
/// Registers authorization request fetchers and related services into the provided IServiceCollection.
/// This method adds implementations for various authorization request fetchers as singletons, ensuring
/// that they are efficiently reused throughout the application. It also composes these fetchers into a
/// composite fetcher to handle different types of authorization requests seamlessly.
/// </summary>
/// <param name="services">The IServiceCollection to which the services will be added.</param>
/// <returns>The updated IServiceCollection with the added authorization request fetchers.</returns>
public static IServiceCollection AddAuthorizationRequestFetchers(this IServiceCollection services)
{
return services
// Add a JSON object binder as a singleton
.AddSingleton<IJsonObjectBinder, JsonSerializationBinder>()

// Add individual authorization request fetchers as singletons
.AddSingleton<IAuthorizationRequestFetcher, PushedRequestFetcher>()
.AddSingleton<IAuthorizationRequestFetcher, RequestUriFetcher>()
.AddSingleton<IJsonObjectBinder, JsonSerializationBinder>()
.AddSingleton<IAuthorizationRequestFetcher, RequestObjectFetcher>()

// Compose the individual fetchers into a composite fetcher
.Compose<IAuthorizationRequestFetcher, CompositeRequestFetcher>();
}


/// <summary>
/// Adds a series of validators for authorization context as a composite service to ensure comprehensive validation
/// of authorization requests.
Expand Down

0 comments on commit fa670d7

Please sign in to comment.