/// <summary> /// Replaces the existing <see cref="AccountClaimsPrincipalFactory{TAccount}"/> with the user factory defined by <typeparamref name="TAccountClaimsPrincipalFactory"/>. /// </summary> /// <typeparam name="TAccountClaimsPrincipalFactory">The new user factory type.</typeparam> /// <param name="builder">The <see cref="IRemoteAuthenticationBuilder{RemoteAuthenticationState, Account}"/>.</param> /// <returns>The <see cref="IRemoteAuthenticationBuilder{RemoteAuthenticationState, Account}"/>.</returns> public static IRemoteAuthenticationBuilder <OidcAuthenticationState, RemoteUserAccount> AddAccountClaimsPrincipalFactory <TAccountClaimsPrincipalFactory>( this IRemoteAuthenticationBuilder <OidcAuthenticationState, RemoteUserAccount> builder) where TAccountClaimsPrincipalFactory : AccountClaimsPrincipalFactory <RemoteUserAccount> => builder.AddAccountClaimsPrincipalFactory <OidcAuthenticationState, RemoteUserAccount, TAccountClaimsPrincipalFactory>();
/// <summary> /// Replaces the existing <see cref="AccountClaimsPrincipalFactory{TAccount}"/> with the user factory defined by <typeparamref name="TAccountClaimsPrincipalFactory"/>. /// </summary> /// <typeparam name="TAccountClaimsPrincipalFactory">The new user factory type.</typeparam> /// <param name="builder">The <see cref="IRemoteAuthenticationBuilder{RemoteAuthenticationState, Account}"/>.</param> /// <returns>The <see cref="IRemoteAuthenticationBuilder{RemoteAuthenticationState, Account}"/>.</returns> public static IRemoteAuthenticationBuilder <RemoteAuthenticationState, RemoteUserAccount> AddAccountClaimsPrincipalFactory <[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TAccountClaimsPrincipalFactory>( this IRemoteAuthenticationBuilder <RemoteAuthenticationState, RemoteUserAccount> builder) where TAccountClaimsPrincipalFactory : AccountClaimsPrincipalFactory <RemoteUserAccount> => builder.AddAccountClaimsPrincipalFactory <RemoteAuthenticationState, RemoteUserAccount, TAccountClaimsPrincipalFactory>();