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 !!
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);
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 !!
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)
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.
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 --
And then the class MyUserStore:
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 !!
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
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.
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"
Anybody have experience with this??
Hi,
Did you get this to work? I'm having the same problem.
/A
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
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 havepasswordFormat="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 overridePasswordFormat
and explicitly set toMembershipPasswordFormat.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.
is working on a reply...