Author Message
DmitrySenashenko3
Joined: Aug 28, 2019
Messages: 62
Offline
Hello,
How to customize java code of REST for putting of login/password to authorization from variables?
I believe there is secret solution.
Could you share it?
I'll very appreciate for this.
Rg, Dmitry
DmitrySenashenko3
Joined: Aug 28, 2019
Messages: 62
Offline
Is it something like?
setUsernameFromParameter(mySession.getVariableField("Authconfig", "login").getStringValue());
setPasswordFromParameter(mySession.getVariableField("Authconfig", "password").getStringValue());

Thanks, Dmitry
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
You need to override the methods like this:

@Override
public void setPasswordFromParameter(String value) {
userName = value;
}

@Override
public void setUsernameFromParameter(String value) {
password = value;
}

Then at the end of the constructor, you would call the methods:

//}}END:CLASS:CONSTRUCTOR

setUserNameFromParameter("xxxxxxxx");
setPasswordFromParameter("xxxxxxxx");
DmitrySenashenko3
Joined: Aug 28, 2019
Messages: 62
Offline
Thank you so much.
Go to:   
Mobile view