Authentication in Angular JS , Web Api RRS feed

  • Question

  • User-1782410546 posted


    I have a project which was built with "AngularStart" template (ASP.NET MVC4 SPA Template with Angular JS,Web Api and Bootstrap)

    My solution has the following projects

    1. ASP.NET MVC with Angular JS  (Web Application)

    2. Business Models (Class library)

    3. Business Layer (Class library)

    4. Entity frame work Data layer (Class library)

    These 4 projects are in one solution.

    And apart this i have web api , which will be talking with the data base for all CRUD operations , web api reference is added in the business layer.

    This is all about my project architecture.

    Now i need to implement Authentication and Authorization for my Angular JS and web api both for Windows Authentication and forms authentication.

    i.e when a user is connected to LAN network then we have to use his windows credentials for authentication and no login screen should be displayed.

    and when he is connected to other network , login screen should be displayed.

    I am using VS 2012 Ultimate and MVC5 is installed.

    I have googled about this and found http://bitoftech.net/2014/06/09/angularjs-token-authentication-using-asp-net-web-api-2-owin-asp-net-identity/

    but i dont want to use Asp.net identity, i am using Entity Framework.

    Can any one help me on this.


    Vijay Devd

    Monday, February 8, 2016 12:21 PM


All replies

  • User-84896714 posted

    Hi vijayd48,

    Thank you for your post.

    but i dont want to use Asp.net identity,

    Why don't you want use Identity? It is a very common components in ASP.NET. It is the best Authentication solution in asp.net until now. If there are some limit on your database. We could custom storage providers for ASP.NET Identity.

    Best Regards,
    Li Wang

    Wednesday, February 10, 2016 4:25 AM
  • User-1782410546 posted

    Hi Wang,

    Thanks for your reply.

    At this point, i could not use Asp.net Identity , this decision should be taken while designing the database.

    Thanks for providing the ASP.NET Identity overview, with this i have learnt few things related to Identity .

    By default, the ASP.NET Identity  uses Entity Framework Code First to create the database.

    But i am using Entity Framework DB First approach.

    but the actual point is about the security for Angular JS application having web api as backend

    can any one provide me any link for this.


    Vijay Devd

    Thursday, February 11, 2016 10:29 AM
  • User-782957977 posted

    If don't want asp.net identity, try basic authentication. You can design authentication logic, based on your requirements.


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 15, 2016 2:36 PM