locked
Windows Authentication in AngularJS project RRS feed

  • Question

  • User1396448631 posted

    Hi,

    When we got the project requirements initially, there was nothing about windows authentication. The requirements where fairly simple, so we thought of implementing it using AngularJS/Bootstrap.

    Now there is a requirement that certain active directory group should not have access to a button/functionality while rest should have it.

    Can you please let me know what bare bone code I need to include to have windows authentication in this project.

    Thanks!

    Tuesday, December 22, 2015 10:43 PM

All replies

  • User61956409 posted

    Hi dbqasp,

    Firstly, please refer to the following article to implement Windows Authentication.

    http://www.asp.net/mvc/overview/older-versions-1/security/authenticating-users-with-windows-authentication-cs

    Besides, if you are using Web API with your SPA, you could refer to this.

    http://www.asp.net/web-api/overview/security/basic-authentication

    Best Regards,

    Fei Han

    Wednesday, December 23, 2015 3:03 AM
  • User1396448631 posted

    Hi Fei Han,

    My project has a bunch of aspx (containing pure html code), js and asmx web service files. I dont have any controller in c#

    The first link you sent has the home controller in c#. Do I really need that?

    I already have an angularjs controller something like this

    function () {
        "use strict";
        var app = angular.module('CPFWeb', ['ngRoute']);
    
        app.config(function ($routeProvider) {
    
            $routeProvider
                .when('/', {
                    templateUrl: '../Default.aspx'
                })
    ....

    I am using asmx instead of web api.

    Please suggest your thoughts?

    Thank you

    Wednesday, December 23, 2015 2:26 PM
  • User-2073147954 posted

    asmx is dead use web api

    Monday, December 28, 2015 5:57 PM