Skip to content

Commit

Permalink
Merge pull request #257 from SawamiWataru/Issue-232
Browse files Browse the repository at this point in the history
Incorrect error message.(__authz endpoint)
  • Loading branch information
SawamiWataru authored Oct 10, 2018
2 parents a35bb91 + 0918182 commit 9850542
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ private Response handleCodeFlow(
e.getMessage(), state, "code");
}

//Password authentication · Transcel token authentication · Cookie authentication separation
//Password authentication / Transcel token authentication / Cookie authentication separation
if (username != null || password != null) {
//TODO Return error because it is not yet implemented
return this.returnErrorRedirectCodeGrant(redirectUriStr, OAuth2Helper.Error.UNSUPPORTED_GRANT_TYPE,
Expand Down Expand Up @@ -925,7 +925,7 @@ private Response handleImplicitFlow(
//TODO box existence check -> In some cases: Return token, if not: Create box (authorization check -> Box import execution)
//However, it returns an error until Box import is implemented

//Password authentication · Transcel token authentication · Cookie authentication separation
//Password authentication / Transcel token authentication / Cookie authentication separation
if (username != null || password != null) {
//When there is a setting in either user ID or password
Response response = this.handleImplicitFlowPassWord(pTarget, redirectUriStr, clientId,
Expand Down Expand Up @@ -1187,12 +1187,14 @@ private void checkImplicitParam(String clientId, String redirectUri, URI baseUri
//Compare client_id and redirect_uri, and if the cells are different, an authentication error
//Comparison of cell URLs
if (!objClientId.getAuthority().equals(objRedirectUri.getAuthority())
|| rPaths.length == 0
|| !cPaths[0].equals(rPaths[0])) {
throw PersoniumCoreException.Auth.REQUEST_PARAM_REDIRECT_INVALID;
}

//Compare the client_id with the name of the requested cell, and an error if the cells are the same
if (cPaths[0].equals(this.cell.getName())) {
if (cPaths.length == 0
|| cPaths[0].equals(this.cell.getName())) {
throw PersoniumCoreException.Auth.REQUEST_PARAM_CLIENTID_INVALID;
}

Expand Down

0 comments on commit 9850542

Please sign in to comment.