Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "gvb"

Question

Hello,

I'm trying to implement the ResetPassword feature trough MVC controller for the user and i'm not sure to know how is it made with the UserManager.

i tried to get a ResetToken but i get the error: No IUserTokenProvider is registered.

_userManager.GeneratePasswordResetTokenAsync(user.Id);

Is there something implemented in ABP or should i check trough Identity ?

thx

<cite>daws: </cite>

I understand your message; but I think it is a little bit aggressive.

I must admit i was angry :( and that's why i said "sorry for being angry! "

i'm sorry for being aggressive :S dont take it personnaly seriously :) you are doing a great job and the framework is awesome ;)

I understand that may be there are other more important feature to fix or to develop

<cite>hikalkan: </cite>

But, I think that it is not true to sign-in/sign-out in web api layer. Because logging in to a system is related to web and it should be done in mvc project.

Serious? we must be a lot of people that are wrong.... a single research on AngularJS and WebAPI Authentication and you will see ton of posts...

There is 2 more post on the forum asking for the same thing... #179 <-- This one point out here and an other post #91  <-- the other post

Why not listening to people that need the Bearer Token? We are all wrong ?

I will do it by myself but... many people will ask for this feature with time ...

ABP is still pretty young and already 3 Threads for the same question and still no valid answer other than i will show you how to use MVC that is not what we are asking for... my MVC Login / Logout / Register / ForgotPassword is working pretty well but now we need to switch it to WebAPI Layer.

sorry for being angry! I doesn't want to be mean... but I wanna point out that we are a lot of people that require this functionnality

I'm still waiting for answer!

How do i repeat those login line of code in WebAPI layer ?

AuthenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie);
AuthenticationManager.SignIn(new AuthenticationProperties { IsPersistent = loginModel.RememberMe }, loginResult.Identity);

where the AuthenticationManager were

private IAuthenticationManager AuthenticationManager
{
    get  { return HttpContext.GetOwinContext().Authentication;  }
}

Or is there any other way to set Remember me and owin cookies ?

ok thx a lot for your answer!

the OWIN context is used to Login User with the MVC Controller

this is from Taskever -> AccountController

private IAuthenticationManager AuthenticationManager
        {
            get
            {
                return HttpContext.GetOwinContext().Authentication;
            }
        }

       private async Task SignInAsync(AbpUser user, bool isPersistent)
        {
            AuthenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie);
            var identity = await _userManager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie);
            identity.AddClaim(new Claim(AbpClaimTypes.TenantId, "42"));
            AuthenticationManager.SignIn(new AuthenticationProperties { IsPersistent = isPersistent }, identity);
        }

so OWIN know the user if he's connected (Logged in)

Does the WebAPI layer is doing the same thing !? Does OWIN will know my User if i go with AbpUserManager.LoginAsync ?

I'm asking this because i will use SignalR soon and it work on Owin. I want SignalR to know the current User with his current Context!

I agree i must be doing something wrong! :) I wanted to use the IAuthenticationManager from the HttpContext.GetOwinContext().Authentication

I use Module-Zero from an old version updated to the newest one. I started with the Module-Zero sample in the past :)

Thx to point me out the AbpUserManager that containt the method LoginAsync!

Does it make my OWIN Context still Authentified by this method ?

Hello,

I'm currently doing my Login action in MVC but i wan't to switch this to the Application Layer. My problem is HttpContext is not accessible in the Application Layer!

Anyone know a way to do it with the Application Layer?

thx in advance!

Yea i use Module-Zero and never had this problem till today where i updated from low version to latest!

I never used the Multi-Tenancy part. Mostly because i'm not even sure to understand what's it is for? Multi-Compagny on 1 web-site?

So i put the Config in the pre-ini and in my seeder i put the context.DisableAllFilter() for the seeding part. I will test it tomorrow!

i did too many modification to try to make it back running.

And to answer, i'm trying to put my default Admin in my seed and there was nothing that was working because it was telling me the error!

Showing 21 to 30 of 53 entries