Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public class RecordContext {
public static final int TYPE_AUTH_POLL_FREQ = 211;
public static final int TYPE_AUTH_POLL_FREQ_UNITS = 212;
public static final int TYPE_AUTH_POLL_HEADERS = 213;
public static final int TYPE_AUTH_POLL_METHOD = 214;

public static final int TYPE_SESSION_MANAGEMENT_TYPE = 220;
public static final int TYPE_SESSION_MANAGEMENT_FIELD_1 = 221;
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ public WebSession authenticate(
WebSession session = sessionManagementMethod.extractWebSession(msg);
user.setAuthenticatedSession(session);

if (this.isAuthenticated(msg, user, true)) {
if (this.getVerificationMethod().isAuthenticated(msg, user, true)) {
// Let the user know it worked
AuthenticationHelper.notifyOutputAuthSuccessful(msg);
user.getAuthenticationState().setLastAuthFailure("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,10 @@ public void loadScript(ScriptWrapper scriptW) {
try {
if (script instanceof AuthenticationScriptV2) {
AuthenticationScriptV2 scriptV2 = (AuthenticationScriptV2) script;
setLoggedInIndicatorPattern(scriptV2.getLoggedInIndicator());
setLoggedOutIndicatorPattern(scriptV2.getLoggedOutIndicator());
getVerificationMethod()
.setLoggedInIndicatorPattern(scriptV2.getLoggedInIndicator());
getVerificationMethod()
.setLoggedOutIndicatorPattern(scriptV2.getLoggedOutIndicator());
}
String[] requiredParams = script.getRequiredParamsNames();
String[] optionalParams = script.getOptionalParamsNames();
Expand Down Expand Up @@ -322,8 +324,10 @@ public WebSession authenticate(
try {
if (script instanceof AuthenticationScriptV2) {
AuthenticationScriptV2 scriptV2 = (AuthenticationScriptV2) script;
setLoggedInIndicatorPattern(scriptV2.getLoggedInIndicator());
setLoggedOutIndicatorPattern(scriptV2.getLoggedOutIndicator());
getVerificationMethod()
.setLoggedInIndicatorPattern(scriptV2.getLoggedInIndicator());
getVerificationMethod()
.setLoggedOutIndicatorPattern(scriptV2.getLoggedOutIndicator());
}
msg =
script.authenticate(
Expand Down Expand Up @@ -362,7 +366,7 @@ public WebSession authenticate(
return null;
}

if (this.isAuthenticated(msg, user, true)) {
if (this.getVerificationMethod().isAuthenticated(msg, user, true)) {
// Let the user know it worked
user.getAuthenticationState().setLastAuthFailure("");
AuthenticationHelper.notifyOutputAuthSuccessful(msg);
Expand Down Expand Up @@ -581,17 +585,25 @@ private void loadScript(ScriptWrapper scriptW, boolean adaptOldValues) {
Constant.messages.getString(
"authentication.method.script.dialog.loggedInOutIndicatorsInScript.toolTip");
String loggedInIndicator = scriptV2.getLoggedInIndicator();
this.method.setLoggedInIndicatorPattern(loggedInIndicator);
this.indicatorsPanel.setLoggedInIndicatorPattern(loggedInIndicator);
this.indicatorsPanel.setLoggedInIndicatorEnabled(false);
this.indicatorsPanel.setLoggedInIndicatorToolTip(toolTip);
this.method
.getVerificationMethod()
.setLoggedInIndicatorPattern(loggedInIndicator);

String loggedOutIndicator = scriptV2.getLoggedOutIndicator();
this.method.setLoggedOutIndicatorPattern(loggedOutIndicator);
this.indicatorsPanel.setLoggedOutIndicatorPattern(loggedOutIndicator);
this.indicatorsPanel.setLoggedOutIndicatorEnabled(false);
this.indicatorsPanel.setLoggedOutIndicatorToolTip(toolTip);
} else {
this.method
.getVerificationMethod()
.setLoggedOutIndicatorPattern(loggedOutIndicator);

if (this.indicatorsPanel != null) {
this.indicatorsPanel.setLoggedInIndicatorPattern(loggedInIndicator);
this.indicatorsPanel.setLoggedInIndicatorEnabled(false);
this.indicatorsPanel.setLoggedInIndicatorToolTip(toolTip);

this.indicatorsPanel.setLoggedOutIndicatorPattern(loggedOutIndicator);
this.indicatorsPanel.setLoggedOutIndicatorEnabled(false);
this.indicatorsPanel.setLoggedOutIndicatorToolTip(toolTip);
}
} else if (this.indicatorsPanel != null) {
this.indicatorsPanel.setLoggedInIndicatorEnabled(true);
this.indicatorsPanel.setLoggedInIndicatorToolTip(null);
this.indicatorsPanel.setLoggedOutIndicatorEnabled(true);
Expand Down Expand Up @@ -764,8 +776,10 @@ public void loadMethod(
try {
if (s instanceof AuthenticationScriptV2) {
AuthenticationScriptV2 sV2 = (AuthenticationScriptV2) s;
method.setLoggedInIndicatorPattern(sV2.getLoggedInIndicator());
method.setLoggedOutIndicatorPattern(sV2.getLoggedOutIndicator());
method.getVerificationMethod()
.setLoggedInIndicatorPattern(sV2.getLoggedInIndicator());
method.getVerificationMethod()
.setLoggedOutIndicatorPattern(sV2.getLoggedOutIndicator());
}
method.credentialsParamNames = s.getCredentialsParamsNames();
} catch (Exception e) {
Expand Down Expand Up @@ -986,8 +1000,10 @@ public void handleAction(JSONObject params) throws ApiException {
try {
if (s instanceof AuthenticationScriptV2) {
AuthenticationScriptV2 sV2 = (AuthenticationScriptV2) s;
method.setLoggedInIndicatorPattern(sV2.getLoggedInIndicator());
method.setLoggedOutIndicatorPattern(sV2.getLoggedOutIndicator());
method.getVerificationMethod()
.setLoggedInIndicatorPattern(sV2.getLoggedInIndicator());
method.getVerificationMethod()
.setLoggedOutIndicatorPattern(sV2.getLoggedOutIndicator());
}
method.credentialsParamNames = s.getCredentialsParamsNames();

Expand Down
Loading
Loading