Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $scope.loginUser = function () {
- var reqq = {
- method: 'POST',
- url: '/Token',
- data: "userName=123@tut.by&password=12345Yy*&grant_type=password"
- };
- $http(reqq).then(function successCallback(data) {
- console.log(data.data.userName);
- sessionStorage.setItem(tokenKey, data.data.access_token);//что такое tokenKey ?
- }, function errorCallback(res) {
- console.log(res);
- });
- };
- $scope.userInfo = function () {
- $http({
- method: 'GET',
- url: '/api/Account/UserInfo'
- }).then(function successCallback(res) {
- console.log(res);
- }, function errorCallback(res) {
- console.log(res);
- });
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement