zzz
June 5, 2019, 5:31am
1
From the auth-sample.js,the content as follow:
“use strict”;
function connectionRequest(deviceId, url, username, password, callback) {
return callback(username || deviceId, password || “”);
}
exports.connectionRequest = connectionRequest;
I create a new auth.js file use this content,but it’s no function,
when I use the content as follow:
“use strict”;
function connectionRequest(deviceId, url, username, password, callback) {
return callback(‘someUsername’, ‘somePassword’);
}
exports.connectionRequest = connectionRequest;
In my CPE,I input request username and password from the script , it work normal,
but I want to use dynamic username and password in CPE, so that acs can control CPE .
Have someone to help me? or need more information for this
I’m not sure I understand the question. From what you’re describing the script seems to be working as intended.
zzz
June 5, 2019, 8:33am
3
@zaidka
when I use this auth.js,
function connectionRequest(deviceId, url, username, password, callback) {
return callback(‘someUsername’, ‘somePassword’);
}
exports.connectionRequest = connectionRequest;
/////
and I configure ‘someUsername’, ‘somePassword’ in CPE configuration,it work normal,
but when I use this auth.js:
“use strict”;
function connectionRequest(deviceId, url, username, password, callback) {
return callback(username || deviceId, password || “”);
}
exports.connectionRequest = connectionRequest;
//////
it is not work,when I input ‘someUsername’, ‘somePassword’ in CPE configuration
The arguments ‘username’ and ‘password’ have the values of the ‘ConnectionRequestUsername’ and ‘ConnectionRequestPassword’ params as they exist in the database. You’ll want to create a preset to ensure those parameters are set.
zzz
June 5, 2019, 8:48am
5
@zaidka ,yes I think that create a preset is my need,but I don’t know how to create it
.
I think it too complex for me.please provide a example.
Ok,I will study it,thank you for your help@zaidka
zzz
June 5, 2019, 9:59am
6
@zaidka
I still don’t find how to set ‘ConnectionRequestUsername’ and ‘ConnectionRequestPassword’ params in preset
@zzz
here is the preset
and here is the provision, which is executed by preset
const now = Date.now();
log('Set Connection Request params');
declare("InternetGatewayDevice.ManagementServer", {value: now});
declare("InternetGatewayDevice.ManagementServer.ConnectionRequestUsername", {value: now}, {value: "acs"});
declare("InternetGatewayDevice.ManagementServer.ConnectionRequestPassword", {value: now}, {value: "acs"});
zzz
June 5, 2019, 12:40pm
8
@jozefrebjak
thank you I will try tomorrow