Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.1 kB
1
Indexable
Never
angular.module("eskerHubApp").factory("authMicrosoftService", [
    "$http",
    function ($http) {
        function signin() {
        return $http
            .get("/api/authMicrosoft/signin")
            .then(function (response) {
            return response.data;
            });
        }

        function acquireToken() {
        return $http
            .get("/api/authMicrosoft/acquireToken")
            .then(function (response) {
            return response.data;
            });
        }

        function signout() {
        return $http
            .get("/api/authMicrosoft/signout")
            .then(function (response) {
            return response.data;
            });
        }

        function redirect() {
        return $http
            .post("/api/authMicrosoft/redirect")
            .then(function (response) {
            return response.data;
            });
        }

        return {
            signin : signin,
            acquireToken : acquireToken,
            signout : signout,
            redirect : redirect,
        };
    },
]);