Hi There,
I've created a Project based on ABP + ModuleZero template, but when I try to login as admin with the default password(AM4OLBpptxBYmM79lGOX9egzZk3vIQU3d/gFCJzaBjAPXzYIK3tQ2N7X4fcrHtElTw==), I get an invalid password exception. I've tried creating the project twice, and the password in the db is definitely correct, but I can't seem to get around this error.
Also, this means that because I can't log a user in, abpauthorize always fails. Is there a way to disable the abpauthorize login check, or override the abpauthorize function to implement custom authorization attributes?
Thanks a lot!
5 Answer(s)
-
0
The password that is seeded in the database by default is already hashed. The default password for admin is 123qwe. So try giving that as the password.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Yep, that did the trick!
Any idea of how to implement custom authorization using the ABPAuthorize attribute? I don't see any examples for overriding the attribute...
Thanks again.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Easy.. just go to PermissionChecker in your project (if you created from template, you should have it) and override IsGrantedAsync(long userId, string permissionName) and IsGrantedAsync(string permissionName) methods.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hey,
I've tried overriding those methods, returning an arbitary value just so i can see if the debugger goes into the methods, but it never ends up there. It goes into the PermissionChecker constructor, but never finds itself in the overridden methods, and therefore never never applies custom logic. Any ideas?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
I just tested, it just enters my overrided method. ABP calls these methods when an AbpAuthorize attribute is used with a permission name, or checked a permission manually.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)