Skip to content

Commit

Permalink
fix(jans-auth-server): covered one more case when consent is off
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriyz committed Jan 31, 2022
1 parent 81ad31b commit 8b59739
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,10 @@ private WebElement waitForRequredElementLoad(WebDriver currentDriver, String id)
protected String acceptAuthorization(WebDriver currentDriver, String redirectUri) {
String authorizationResponseStr = currentDriver.getCurrentUrl();

if (authorizationResponseStr.contains("code=") || authorizationResponseStr.contains("access_token=")) {
return authorizationResponseStr;
}

// Check for authorization form if client has no persistent authorization
if (!authorizationResponseStr.contains("#")) {
WebElement allowButton = waitForRequredElementLoad(currentDriver, authorizeFormAllowButton);
Expand Down

0 comments on commit 8b59739

Please sign in to comment.