Hi all, I'm trying to extends to token expiration time when using the generateToken method of the IdentityManager , but could not seem to succeed. anyone have some thoughts about this?
Please show your code and describe more precisely what you need/want
hello.
i am using POST method to generate token.
You can increase expiration value while generating token.
var tokenvalue = $.ajax({
type: "POST",
url: generatetoken, //address of arcgis server or portal
data: {
username: username,
password: password,
client: "referer&requestip",
referer: locationaddress,
expiration: '60',
f: "json"
},
dataType: "json"
}).done(function (response) {....
for IdentityManager you can try this;
const userInfo = {
username: username,
password: password,
client: "referer",
referer: locationaddress,
expiration: 60
};
IdentityManager.generateToken(serverInfo, userInfo).then(function (response){....