Skip to content

Loading…

Remove dependency on Microsoft.Owin.Security.DataProtection.DpapiDataProtectionProvider #2104

Closed
DamianEdwards opened this Issue · 3 comments

4 participants

@DamianEdwards
SignalR member

The code in OwinExtensions.cs that attempts to retrieve an IDataProtectionProvider from IAppBuilder and then if that's null create an instance of Microsoft.Owin.Security.DataProtection.DpapiDataProtectionProvider using the default ctor needs to be removed. The parameterless ctor has been obsoleted from Microsoft.Owin.Security.

Instead, SignalR should simply call the GetDataProtector() extension method on IAppBuilder and inject that into the dependency resolver.

@davidfowl
SignalR member

It's been obsoleted and isn't even released yet. Epic.

@halter73 halter73 was assigned
@halter73
SignalR member

Should I use CreateDataProtector(this IAppBuilder app, params string[] purposes)? It looks to me that CreateDataProtector cannot return null. Is that the case? What about on Mono?

@halter73 halter73 added a commit that referenced this issue
@halter73 halter73 Use CreateDataProtector instead of the deprecated GetDataProtectionPr…
…ovider

- This unfortunately removes the ability to fall back to DefaultProtectedData
  on Mono

#2104
552920d
@Xiaohongt Xiaohongt was assigned
@Xiaohongt
SignalR member

verified

@Xiaohongt Xiaohongt closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.