Investigate having CslaPrincipal subclass ClaimsPrincipal #496

Closed
rockfordlhotka opened this Issue Nov 10, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@rockfordlhotka
Owner

rockfordlhotka commented Nov 10, 2015

As per this discussion: MarimerLLC/cslaforum#91

The two major considerations I can see right now are whether ClaimsPrincipal/ClaimsIdentity exists across all the platforms supported by CSLA, and whether it will be possible to implement IMobileObject over the Microsoft types.

@rockfordlhotka rockfordlhotka added this to the Backlog milestone Nov 10, 2015

@dazinator

This comment has been minimized.

Show comment Hide comment
@dazinator

dazinator Jan 24, 2017

Contributor

There is a NuGet package for claims, which supports netstandard 1.3 and most platforms, however for full .NET it requires .NET 4.6.

Prior to .net 4.6, the claims types appear to be in mscorlib - for example for .net 452: // C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\mscorlib.dll

whether ClaimsPrincipal/ClaimsIdentity exists across all the platforms supported by CSLA

Based on the above, a quick glance suggests that they do, but depending on what version of the platform you want to support, the types may have been moved around, so you might have to do some cross compilation.

I think this would be a lot easier to achieve in the future, if most CSLA projects were moved to netstandard.
I did see you had some work around netstandard but appreciate that would be a pretty grand change.

Contributor

dazinator commented Jan 24, 2017

There is a NuGet package for claims, which supports netstandard 1.3 and most platforms, however for full .NET it requires .NET 4.6.

Prior to .net 4.6, the claims types appear to be in mscorlib - for example for .net 452: // C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\mscorlib.dll

whether ClaimsPrincipal/ClaimsIdentity exists across all the platforms supported by CSLA

Based on the above, a quick glance suggests that they do, but depending on what version of the platform you want to support, the types may have been moved around, so you might have to do some cross compilation.

I think this would be a lot easier to achieve in the future, if most CSLA projects were moved to netstandard.
I did see you had some work around netstandard but appreciate that would be a pretty grand change.

@rockfordlhotka rockfordlhotka removed this from the Backlog milestone Mar 29, 2017

@rockfordlhotka rockfordlhotka added this to the 4.7.100 milestone Sep 12, 2017

@rockfordlhotka rockfordlhotka self-assigned this Sep 12, 2017

rockfordlhotka added a commit to rockfordlhotka/csla that referenced this issue Sep 12, 2017

rockfordlhotka added a commit to rockfordlhotka/csla that referenced this issue Sep 13, 2017

rockfordlhotka added a commit to rockfordlhotka/csla that referenced this issue Sep 13, 2017

rockfordlhotka added a commit to rockfordlhotka/csla that referenced this issue Sep 13, 2017

rockfordlhotka added a commit to rockfordlhotka/csla that referenced this issue Sep 20, 2017

@rockfordlhotka

This comment has been minimized.

Show comment Hide comment
@rockfordlhotka

rockfordlhotka Oct 9, 2017

Owner

The solution I've settled on is to do the following:

  1. Implement Csla.Security.CslaClaimsPrincipal as a simple wrapper around the normal ClaimsPrincipal so it implements IMobileObject (otherwise it can't be serialized via MobileFormatter).
  2. Add special case code to MobileFormatter to handle the new CslaClaimsPrincipal type; necessary because deserialization must be handled via the constructor, it isn't possible to create the object then initialize, it must be created by passing in a binary stream to the ctor.

The result of this work is that anyone needing to use ClaimsPrincipal and CSLA can use CslaClaimsPrincipal and it should work universally.

Owner

rockfordlhotka commented Oct 9, 2017

The solution I've settled on is to do the following:

  1. Implement Csla.Security.CslaClaimsPrincipal as a simple wrapper around the normal ClaimsPrincipal so it implements IMobileObject (otherwise it can't be serialized via MobileFormatter).
  2. Add special case code to MobileFormatter to handle the new CslaClaimsPrincipal type; necessary because deserialization must be handled via the constructor, it isn't possible to create the object then initialize, it must be created by passing in a binary stream to the ctor.

The result of this work is that anyone needing to use ClaimsPrincipal and CSLA can use CslaClaimsPrincipal and it should work universally.

rockfordlhotka added a commit to rockfordlhotka/csla that referenced this issue Oct 9, 2017

@rockfordlhotka rockfordlhotka referenced this issue in MarimerLLC/cslaforum Oct 11, 2017

Open

CSLA .NET 4.7 (coming soon) #442

@rockfordlhotka rockfordlhotka referenced this issue in MarimerLLC/cslaforum Mar 22, 2018

Open

CSLA .NET version 4.7.100 release #510

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment