Skip to content

Commit

Permalink
Return 401 if client is null in RESOURCE_OWNER_PASSWORD_CREDENTIALS
Browse files Browse the repository at this point in the history
  • Loading branch information
yurem committed Nov 16, 2015
1 parent 3b2e7ab commit 6ac19e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Server/conf/oxauth-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@
"clientAuthenticationFilters":[
{
"filter":"myCustomAttr1={0}",
"bind":"${config.oxauth.authentication.filter.bindDn}",
"bindPasswordAttribute":"${config.oxauth.authentication.filter.bindPassword}",
"bind":false,
"bindPasswordAttribute":"oxAuthClientSecret",
"baseDn":"ou=clients,o=${config.oxauth.organization},o=gluu"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ public Response requestAccessToken(String grantType, String code,
scope,
idToken));
} else if (gt == GrantType.RESOURCE_OWNER_PASSWORD_CREDENTIALS) {
// if (client == null) {
// return sendResponse(error(401, TokenErrorResponseType.INVALID_CLIENT));
// }
//
if (client == null) {
return sendResponse(error(401, TokenErrorResponseType.INVALID_CLIENT));
}

User user = null;
if (authenticationFilterService.isEnabled()) {
String userDn = authenticationFilterService.processAuthenticationFilters(request.getParameterMap());
Expand Down

0 comments on commit 6ac19e0

Please sign in to comment.