Base solution for your next web application

Activities of "efijeremiah"

all the url's links in your reply are broken

Alternatively, the last option i had in mind is to use the ApplicationCookie as it's configured originally on Startup.cs and call from another client (postman for example) to the WebApi just like you do with the bearer. But in this case, i keep getting the same error that the user is not logged in. even though i've tried to play with the Cookie parameters on Postman and made my Cookie persistence by editing:

        app.UseCookieAuthentication(new CookieAuthenticationOptions
        {
            AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
            LoginPath = new PathString("/Account/Login"),
            ExpireTimeSpan = TimeSpan.FromDays(100000.0) //HAS TO BE A DECIMAL VALUE. IF NOT, WILL NOT WORK!
        });

As previously noted, I prefer working all the way with bearer on all client applications. But in the current situation please you advice how can i access the GetUsers for example using Cookie instead of bearer ?

the scenario i'm facing is as follows: i have several client applications including: Chrome extension, firefox extension, the web application and future mobile application

On the Chrome extension i need to use the Web Application screens for Login/External Login/Register/Password Reset etc..therefore i need 1 method for login/register/prefor webAPI calls. from what i read and know Bearer is the right way to go.

currently i can use the WebAPI perfectly using bearer but only for login (no register/external login methods). I tried what you've suggested and as expected the Web app doesn't work anymore. After day of trial and error no luck, the closest i got is through this post: <a class="postlink" href="http://stackoverflow.com/questions/23262471/use-owin-ws-federation-package-to-authenticate-against-adfs-3-0">http://stackoverflow.com/questions/2326 ... t-adfs-3-0</a>

adding JUST this line at the beginning of the Configuration method: app.SetDefaultSignInAsAuthenticationType(DefaultAuthenticationTypes.ExternalBearer);

that allowed me to read the login page but after logging in - i got an unauthorized message.

Please your quick help :oops:

I tried and still having difficulties to sort my way out of it. :oops: I have a console application the needs to get list of users, I would appreciate you share a short example / just the source code would be good

Showing 1 to 4 of 4 entries