Skip to content

Should OAuth handlers dispose of HttpRequestMessage/HttpResponseMessage? #10229

@martincostello

Description

@martincostello

While reviewing aspnet-contrib/AspNet.Security.OAuth.Providers#268, I looked at the GoogleHandler class to see if the built-in OAuth handlers do the same as a hint as to whether the disposal is really required or not, which it does not.

This raises the question, should the built-in OAuth handlers be disposing of the HttpRequestMessage/HttpResponseMessage instances they create, or are they a special case for IDisposable like HttpClient and Task/Task<T> where warnings from static analyzers are false positives?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-authIncludes: Authn, Authz, OAuth, OIDC, Bearer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions