Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

how to convert Csla.ApplicationContext.User to SLMPrincipal class ? #944

Open
SachinPNikam opened this issue Apr 29, 2020 · 2 comments
Open

Comments

@SachinPNikam
Copy link

Question
I have
public class SLMPrincipal : Csla.Security.CslaClaimsPrincipal --BO

I did login after I want get the Csla.ApplicationContext.User back to the SLMPrincipal

below code is not working getting error like can not convert claim principal to SLMPrincipal

(SLMPrincipal)Csla.ApplicationContext.User

Version and Platform
CSLA version: 5.1.0
Platform-.NetCore 3.0

@rockfordlhotka
Copy link
Member

Microsoft has been aggressive in pushing us all to use ClaimsPrincipal and ClaimsIdentity. To the point that they'll often silently switch a custom principal type to a ClaimsPrincipal "for you".

As a result, I'm moving ProjectTracker and all other samples to use those two types and not to try and use any custom types. Custom types are just problematic.

Starting in version 5.1 the MobileFormatter includes functionality to serialize the (otherwise not serializable) claims types, providing you with a seamless experience.

@SachinPNikam
Copy link
Author

Thanks Rocky for quick ,valuable reply .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants