Base solution for your next web application
Open Closed

AngularJS Token Authentication with Abp Web API layer #91


User avatar
0
tsaluszewski created

Hi!

Can you please advise what is the best way to use AngularJS Token Authentication with Abp Web API layer? I am using ABP in the SPA application with AngularJS and thinking about using Owin middleware and ASP.NET Identity for authentication and authorization. It has a token service, which can be used in the client side (angular) in place of authentication cookie. However it requires setting up an Owin authentication for the Wep Api layer, which I think will force me to implement my Web Api controller "by hand" rather than using DynamicAPIProxy? The solution I am looking into is described here: <a class="postlink" href="http://bitoftech.net/2014/06/09/angularjs-token-authentication-using-asp-net-web-api-2-owin-asp-net-identity/">http://bitoftech.net/2014/06/09/angular ... -identity/</a>

Is there any other way I can implement authentication/authorization in my SPA in angularJS by using Module Zero services? Is there a feature that can provide my client with an authentication token or cookie that can be exchanged/validated between client and server in a request header?

Kind Regards, TS.


3 Answer(s)
  • User Avatar
    0
    cosmic created

    Hi, I'm working on similar solution right now. I followed this tutorial: <a class="postlink" href="http://bitoftech.net/2014/12/15/secure-asp-net-web-api-using-api-key-authentication-hmac-authentication/">http://bitoftech.net/2014/12/15/secure- ... ntication/</a>, maybe will help you. I don't have this fully implemented yet, but it looks much simpler than Bearer token authentication.

  • User Avatar
    0
    jérôme lambert created

    Hi,

    I'm interesting to put authentication into a ASP.NET boilerplate with Angular SPA too.

    Did you have some experiences to share or code to share?

    Kind regards,

    Jérôme

  • User Avatar
    0
    hikalkan created
    Support Team

    I don't have idea on AngularJs token auth. But, I use IdentityFramework with AngularJs. New 'ABP + module zerı' template can help you starting: <a class="postlink" href="http://www.aspnetboilerplate.com/Templates">http://www.aspnetboilerplate.com/Templates</a>