Skip to content
This repository has been archived by the owner on Aug 3, 2022. It is now read-only.

Commit

Permalink
conf file harmonized
Browse files Browse the repository at this point in the history
  • Loading branch information
tmunzer committed Nov 8, 2016
1 parent f5ea3fc commit b8eef99
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules/
bower_components/
bin/aerohive/config.js
config.js
*.DS_Store
6 changes: 3 additions & 3 deletions bin/aerohive/api/monitor/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ module.exports.clientsList = function (xapi, devAccount, callback) {
* @param {String} devAccount.clientID - Aerohive Developper Account ClientID
* @param {String} devAccount.clientSecret - Aerohive Developper Account secret
* @param {String} devAccount.redirectUrl - Aerohive Developper Account redirectUrl
* @param {String} clientId - The unique number of the client device.
* @param {String} clientID - The unique number of the client device.
* */
module.exports.clientDetails = function (xapi, devAccount, clientId, callback) {
module.exports.clientDetails = function (xapi, devAccount, clientID, callback) {

var path = '/xapi/v1/monitor/clients/' + clientId + '?ownerId=' + xapi.ownerId;
var path = '/xapi/v1/monitor/clients/' + clientID + '?ownerId=' + xapi.ownerId;

// send the API request
api.GET(xapi, devAccount, path, callback);
Expand Down
2 changes: 1 addition & 1 deletion bin/aerohive/api/oauth.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports.getPermanentToken = function(authCode, devAccount, callback){
method: 'POST',
headers: {
'X-AH-API-CLIENT-SECRET' : devAccount.clientSecret,
'X-AH-API-CLIENT-ID': devAccount.clientId,
'X-AH-API-CLIENT-ID': devAccount.clientID,
'X-AH-API-CLIENT-REDIRECT-URI': devAccount.redirectUrl
}
};
Expand Down
16 changes: 8 additions & 8 deletions bin/aerohive/api/req.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var https = require('https');
* @param {String} xapi.accessToken - ACS accessToken
* @param {String} path - path to request the ACS endpoint
* @param {Object} devAccount - information about the Aerohive developper account to user
* @param {String} devAccount.clientId - Aerohive Developper Account clientId
* @param {String} devAccount.clientID - Aerohive Developper Account clientID
* @param {String} devAccount.clientSecret - Aerohive Developper Account secret
* @param {String} devAccount.redirectUrl - Aerohive Developper Account redirectUrl
* */
Expand All @@ -24,7 +24,7 @@ module.exports.GET = function (xapi, devAccount, path, callback) {
method: "GET",
headers: {
'X-AH-API-CLIENT-SECRET': devAccount.clientSecret,
'X-AH-API-CLIENT-ID': devAccount.clientId,
'X-AH-API-CLIENT-ID': devAccount.clientID,
'X-AH-API-CLIENT-REDIRECT-URI': devAccount.redirectUrl,
'Authorization': "Bearer " + xapi.accessToken
}
Expand All @@ -40,7 +40,7 @@ module.exports.GET = function (xapi, devAccount, path, callback) {
* @param {String} path - path to request the ACS endpoint
* @param {Object} data - data to include to the POST Request
* @param {Object} devAccount - information about the Aerohive developper account to user
* @param {String} devAccount.clientId - Aerohive Developper Account clientId
* @param {String} devAccount.clientID - Aerohive Developper Account clientID
* @param {String} devAccount.clientSecret - Aerohive Developper Account secret
* @param {String} devAccount.redirectUrl - Aerohive Developper Account redirectUrl
* */
Expand All @@ -55,7 +55,7 @@ module.exports.POST = function (xapi, devAccount, path, data, callback) {
method: "POST",
headers: {
'X-AH-API-CLIENT-SECRET': devAccount.clientSecret,
'X-AH-API-CLIENT-ID': devAccount.clientId,
'X-AH-API-CLIENT-ID': devAccount.clientID,
'X-AH-API-CLIENT-REDIRECT-URI': devAccount.redirectUrl,
'Authorization': "Bearer " + xapi.accessToken,
'Content-Type': 'application/json'
Expand All @@ -73,7 +73,7 @@ module.exports.POST = function (xapi, devAccount, path, data, callback) {
* @param {String} xapi.accessToken - ACS accessToken
* @param {String} path - path to request the ACS endpoint
* @param {Object} devAccount - information about the Aerohive developper account to user
* @param {String} devAccount.clientId - Aerohive Developper Account clientId
* @param {String} devAccount.clientID - Aerohive Developper Account clientID
* @param {String} devAccount.clientSecret - Aerohive Developper Account secret
* @param {String} devAccount.redirectUrl - Aerohive Developper Account redirectUrl
* */
Expand All @@ -88,7 +88,7 @@ module.exports.PUT = function (xapi, devAccount, path, callback) {
method: "PUT",
headers: {
'X-AH-API-CLIENT-SECRET': devAccount.clientSecret,
'X-AH-API-CLIENT-ID': devAccount.clientId,
'X-AH-API-CLIENT-ID': devAccount.clientID,
'X-AH-API-CLIENT-REDIRECT-URI': devAccount.redirectUrl,
'Authorization': "Bearer " + xapi.accessToken,
'Content-Type': 'application/json'
Expand All @@ -105,7 +105,7 @@ module.exports.PUT = function (xapi, devAccount, path, callback) {
* @param {String} xapi.accessToken - ACS accessToken
* @param {String} path - path to request the ACS endpoint
* @param {Object} devAccount - information about the Aerohive developper account to user
* @param {String} devAccount.clientId - Aerohive Developper Account clientId
* @param {String} devAccount.clientID - Aerohive Developper Account clientID
* @param {String} devAccount.clientSecret - Aerohive Developper Account secret
* @param {String} devAccount.redirectUrl - Aerohive Developper Account redirectUrl
* */
Expand All @@ -120,7 +120,7 @@ module.exports.DELETE = function (xapi, devAccount, path, callback) {
method: "DELETE",
headers: {
'X-AH-API-CLIENT-SECRET': devAccount.clientSecret,
'X-AH-API-CLIENT-ID': devAccount.clientId,
'X-AH-API-CLIENT-ID': devAccount.clientID,
'X-AH-API-CLIENT-REDIRECT-URI': devAccount.redirectUrl,
'Authorization': "Bearer " + xapi.accessToken
}
Expand Down
2 changes: 1 addition & 1 deletion bin/aerohive/config_example → config_example
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
module.exports.aerohive = {
redirectUrl: "https://<server>/oauth/reg",
clientSecret: "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
clientId: "xxxxxxxxx"
clientID: "xxxxxxxxx"
}
4 changes: 2 additions & 2 deletions routes/login.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var express = require('express');
var router = express.Router();
var ApiConf = require(appRoot + "/bin/aerohive/config").aerohive;
var ApiConf = require(appRoot + "/bin/aerohive/config").appServer;


/*================================================================
Expand All @@ -17,7 +17,7 @@ router.get('/', function (req, res, next) {
res.render('login', {
title: 'API Test Tool',
errorcode: errorcode,
client_id: ApiConf.clientId,
client_id: ApiConf.clientID,
redirect_uri: ApiConf.redirectUrl
});
}
Expand Down
6 changes: 3 additions & 3 deletions views/login.pug
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ html
label(for="vpcUrlOl" translate="TOKEN.SERVER")
md-select(id="vpcUrlOl" name="vpcUrl" ng-model="vpcUrl")
md-option(value="cloud-va.aerohive.com") cloud-va.aerohive.com
md-option(value="cloud-ie.aerohive.com") cloud-ie.aerohive.com
md-option(value="cloud-ie.aerohive.com" selected="selected") cloud-ie.aerohive.com
form(id="ATOl" action="/" method="post")
input(type="hidden" name="vpcUrl" value='{{vpcUrl}}')
md-input-container.md-block.flex-gt-sm
label(for="OwnerIDOl" translate="TOKEN.OWNERID")
input(required="required" autocorrect="off" autocapitalize="none" id="ownerIDOl" name="ownerID" type="text")
input(required="required" autocorrect="off" autocapitalize="none" id="ownerIDOl" name="ownerID" type="text" value="11832")
md-input-container.md-block.flex-gt-sm
label(for="accessTokenOl" translate="TOKEN.TOKEN")
input(required="required" id="accessTokenOl" name="accessToken" type="text")
input(required="required" id="accessTokenOl" name="accessToken" type="text" value="i7yXyBisCelYmHW4Xvp_3n6my5srQIqM07b077c5")
div(style="float: right")
md-button.md-raised.md-primary(type="submit" translate="TOKEN.CONNECT" aria-label="connect Token")
div
Expand Down

0 comments on commit b8eef99

Please sign in to comment.