This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I found solution for hashres in requireJs module. It based on method onModuleBundleComplete which invoked for each bundle after it created. | |
// Methods for calc hash used from grunt-task-hashres. | |
requirejs: { | |
compile: { | |
options: { | |
... | |
onModuleBundleComplete: function (data) { | |
var crypto = require('crypto'), | |
fs = require('fs'); | |
var utils = require("./node_modules/grunt-hashres/tasks/hashresUtils"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.login = function () { | |
$http({ // getting TGT (Ticket Granting Ticket) | |
method: 'POST', | |
url: 'http://localhost/cas/v1/tickets', | |
headers: {'Content-Type': 'application/x-www-form-urlencoded'}, | |
data: $.param({username: $scope.loginform.username, password: $scope.loginform.password}) | |
}).success(function(data, status, headers) { | |
// CAS returns location where we can request service ticket | |
var location = headers('Location'); | |
$http({ //requesting service ticket, rest/app/heartbeat is part of our app |