Я пытаюсь интегрировать adal.js в свое приложение. Ниже мой код. Может кто-нибудь, пожалуйста, дайте мне знать, почему аутентификация не срабатывает.
var app = angular.module('TestWebApp', [
'ngRoute',
'testControllers',
'testServices',
'datatables',
'AdalAngular'
]);
/**
* Configure the Routes
*/
app.config(['$routeProvider', '$httpProvider', 'adalAuthenticationServiceProvider', function ($routeProvider, $httpProvider, adalAuthenticationServiceProvider) {
$routeProvider
// Home
.when("/dashboard", {templateUrl: "partials/package.html", controller: "searchCtrl",requireADLogin: true})
// else 404
.otherwise("/404", {templateUrl: "partials/404.html", controller: "searchCtrl"});
adalAuthenticationServiceProvider.init(
{
tenant: 'test.onmicrosoft.com',
clientId: '23234sf-sdf-------'
},
$httpProvider
);
}]);
И URL-адрес моей страницы что-то связывает это.
http://localhost:8081/test-ui/#/dashboard
Это должно перейти на страницу входа в Azure, но это не так.