Created
January 20, 2015 22:40
-
-
Save simonmorley/116bf4e3a3b79306ee5f to your computer and use it in GitHub Desktop.
Medium, creating a login page, Coova Service with Logon
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
| '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