Skip to content

Instantly share code, notes, and snippets.

@simonmorley
Created January 20, 2015 22:40
Show Gist options
  • Save simonmorley/116bf4e3a3b79306ee5f to your computer and use it in GitHub Desktop.
Save simonmorley/116bf4e3a3b79306ee5f to your computer and use it in GitHub Desktop.
Medium, creating a login page, Coova Service with Logon
'use strict';
var app = angular.module('ctLoginsApp.coova.services', ['ngResource']);
app.factory('Coova', ['$resource',
function($resource){
return $resource( 'http://:uamip::uamport' + '/json/:action?',
{ callback: 'JSON_CALLBACK' },
{
status: {
timeout: 1000,
method: 'JSONP',
isArray: false,
params: {
uamip: '@uamip',
uamport: '@uamport',
action: 'status'
}
},
logon: {
method: 'JSONP',
isArray: false,
params: {
uamip: '@uamip',
uamport: '@uamport',
username: '@username',
response: '@response',
action: 'logon'
}
}
});
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment