Activities of "Josh.Cunningham"

Thank you.

Since this is creating a lot of noise for us I am intending to make the following change in the mean time to prevent the error log.

Could you please confirm whether or not you believe this is appropriate, or suggest an alternative if not.

public class OpenIddictCreateIdentitySessionExceptForClientCredentials : 
    OpenIddictCreateIdentitySession,
    IOpenIddictServerHandler<OpenIddictServerEvents.ProcessSignInContext>
{
    private static readonly OpenIddictServerHandlerDescriptor _descriptor = OpenIddictServerHandlerDescriptor
        .CreateBuilder<OpenIddictServerEvents.ProcessSignInContext>()
        .UseSingletonHandler<OpenIddictCreateIdentitySessionExceptForClientCredentials>()
        .SetOrder(100000)
        .SetType(OpenIddictServerHandlerType.Custom)
        .Build();

    public OpenIddictCreateIdentitySessionExceptForClientCredentials(
        IdentitySessionManager identitySessionManager, 
        IWebClientInfoProvider webClientInfoProvider, 
        IOptions<AbpAccountOpenIddictOptions> options) : base(identitySessionManager, webClientInfoProvider, options)
    {
    }

    public new static OpenIddictServerHandlerDescriptor Descriptor
    {
        get
        {
            return _descriptor;
        }
    }

    public new ValueTask HandleAsync(OpenIddictServerEvents.ProcessSignInContext context)
    {    
        if (context == null)
            throw new ArgumentNullException("context");
            
        if (context.Request.IsClientCredentialsGrantType())
            return ValueTask.CompletedTask;

        return base.HandleAsync(context);
    }
}
public override void PreConfigureServices(ServiceConfigurationContext context)
{
    PreConfigure<OpenIddictBuilder>(builder =>
    {
        builder.AddServer(options =>
        {
            options.RemoveEventHandler(OpenIddictCreateIdentitySession.Descriptor);
            options.AddEventHandler(OpenIddictCreateIdentitySessionExceptForClientCredentials.Descriptor);
        });
    });
}

I would also appreciate it if you could provide us with a link to any relevant issue or pull request on this ticket so that we may follow the progress of this fix and remove this code once it is redundant.

Kind regards, Josh

Thank you very much

Yes that did exactly what I wanted, Thank you very much for your help Anjali

Showing 11 to 13 of 13 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on December 16, 2025, 09:09
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.