Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bill Haggerty 43 posts 177 karma points
    May 04, 2016 @ 20:25
    Bill Haggerty
    0

    UmbracoIdentity and Custom Members

    Hello -- I am trying to make a custom member store using the Identity package.

    I don't think I have things set up correctly, but this is what I have so far:

    In UmbracoIdentityStartup.cs --

     app.ConfigureUserManagerForUmbracoMembers<UmbracoApplicationMember>( new MyUserStore(), ApplicationContext );
    

    And then the class MyUserStore:

       public class MyUserStore : UmbracoMembersUserStore<UmbracoApplicationMember>
    
    {
        public MyUserStore()
        {
    
        }
    
        public override Task CreateAsync(UmbracoApplicationMember user)
        {
            throw new NotImplementedException();
        }
    

    I have not included the rest of the methods, what the compiler is complaining about is the parameterless constructor.

    The compiler has two complaints: 1) There is no argument given that corresponds to the required formal parameter 'memberService' of 'UmbracoMembersUserStore

    2)Base class 'UmbracoIdentity.UmbracoMembersUserStore

    Any tips, especially a working snippet example would be greatly appreciated !!

  • Dennis Aaen 4431 posts 17884 karma points admin hq c-trib
    May 04, 2016 @ 20:51
    Dennis Aaen
    0

    Hi Bill,

    Have you seen the GitHub repo for the UmbracoIdentity https://github.com/Shazwazza/UmbracoIdentity on the GitHub repo you can find some documentation

    https://github.com/Shazwazza/UmbracoIdentity/wiki

    Hope this can help you a step further.

    /Dennis

  • Bill Haggerty 43 posts 177 karma points
    May 04, 2016 @ 21:17
    Bill Haggerty
    0

    Dennis -- thanks, I have been through the documentation, and been experimenting with that GitHub repo.

    The documentation gives a hint at: https://github.com/Shazwazza/UmbracoIdentity/wiki/Startup-Configuration

    It gives the signature of the custom overload for Custom user store, and what I have in my first post is what I have been able to understand so far.

  • Bill Haggerty 43 posts 177 karma points
    May 12, 2016 @ 21:08
    Bill Haggerty
    0

    So this compiles, runs, but still does not seem like it is correct. Gives an exception - "Cannot use ASP.Net Identity with UmbracoMemberUserStore when the password format in not Hashed"

     app.ConfigureUserManagerForUmbracoMembers<UmbracoApplicationMember>(
                new UmbracoMembersUserStore<UmbracoApplicationMember>(ApplicationContext.Services.MemberService,
                                                                       ApplicationContext.Services.MemberTypeService,
                                                                       ApplicationContext.Services.MemberGroupService,
                                                                       new IdentityEnabledMembersMembershipProvider(),
                                                                       new ExternalLoginStore()), ApplicationContext);
    

    Anybody have experience with this??

  • Andreas 1 post 71 karma points
    Aug 24, 2017 @ 05:51
    Andreas
    0

    Hi,

    Did you get this to work? I'm having the same problem.

    /A

  • Bill Haggerty 43 posts 177 karma points
    Oct 30, 2017 @ 15:42
    Bill Haggerty
    0

    Andreas, I ended up taking what I thought were rather drastic measures. I pulled the project from Git, and then put the project into my solution. I then put some breakpoints in places, after studying the code, and then hacked in the changes I needed to make it work with a custom LDAP API. It wasn't pretty, but it worked !!

    Bill

  • Shannon Deminick 1484 posts 4984 karma points hq
    Jun 14, 2019 @ 01:03
    Shannon Deminick
    0

    In theory, in your web.config you would have the new UmbracoIdentity.IdentityEnabledMembersMembershipProvider membership provider listed there and as part of that (since you should have only replaced the type attribute in this xml node) you would still have passwordFormat="Hashed" which would force it to be hashed (this is the default shipped with Umbraco)

    A related bug was filed here: https://github.com/Shazwazza/UmbracoIdentity/issues/95

    and part of the answer there was forcing the IdentityEnabledMembersMembershipProvider to override PasswordFormat and explicitly set to MembershipPasswordFormat.Hashed, however, this should just be set in the config.

    I will update the code though to just always force it to be listed as Hashed.

Please Sign in or register to post replies

Write your reply to:

Draft