Source:
<code>protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { log.debug("Entered OAuthTokenInfo QueryString: {}, Parameters : {}", request.getQueryString(), SSOUtils.getRequestParameters(request)); boolean isValidateRequest = false; boolean isSearchAuthzRequest; boolean isPublicResource = false; try { String[] clientIdAndSecret = SSOUtils.getClientIdClientSecret(request); String scope = SSOUtils.getRequestParameter(request, SSOConstants.HTTP_PARAM_SCOPE, ""); isValidateRequest = <START> SSOUtils.scopeAsList(scope).contains("ovirt-ext=token-info:validate"); <END> isSearchAuthzRequest = SSOUtils.scopeAsList(scope).contains("ovirt-ext=token-info:search-authz"); SSOUtils.validateClientAcceptHeader(request); SSOUtils.validateClientRequest(request, clientIdAndSecret[0], clientIdAndSecret[1], null, null); if (isSearchAuthzRequest) { validateQueryType(request); isPublicResource = directoryQueries.get(SSOUtils.getRequestParameter( request, SSOConstants.HTTP_PARAM_SEARCH_QUERY_TYPE)).isPublicQuery(); } if (!isPublicResource) { String token = SSOUtils.getRequestParameter(request, SSOConstants.HTTP_PARAM_TOKEN); SSOUtils.validateRequestScope(request, token, scope); SSOUtils.getSsoSession(request, clientIdAndSecret[0], token, true) .getAssociatedClientIds() .add(clientIdAndSecret[0]); } log.debug("Sending json response"); SSOUtils.sendJsonData(response, isValidateRequest ? Collections.<String, Object>emptyMap() : isSearchAuthzRequest ? buildSearchResponse(request) : buildResponse(request, clientIdAndSecret[0], scope)); } catch(OAuthException ex) { SSOUtils.sendJsonDataWithMessage(response, ex, isValidateRequest); } catch(Exception ex) { SSOUtils.sendJsonDataWithMessage(response, SSOConstants.ERR_CODE_SERVER_ERROR, ex); } }</code><technical_language>worth a constant for "ovirt-ext=token-info:validate" more 1 place</technical_language>

Target:
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { log.debug("Entered OAuthTokenInfo QueryString: {}, Parameters : {}", request.getQueryString(), SSOUtils.getRequestParameters(request)); boolean isValidateRequest = false; boolean isSearchAuthzRequest; boolean isPublicSearchAuthzRequest; try { String[] clientIdAndSecret = SSOUtils.getClientIdClientSecret(request); String scope = SSOUtils.getRequestParameter(request, SSOConstants.HTTP_PARAM_SCOPE, ""); isValidateRequest = SSOUtils.scopeAsList(scope).contains(SSOConstants.VALIDATE_SCOPE); isSearchAuthzRequest = SSOUtils.scopeAsList(scope).contains(SSOConstants.AUTHZ_SEARCH_SCOPE); isPublicSearchAuthzRequest = SSOUtils.scopeAsList(scope).contains(SSOConstants.PUBLIC_AUTHZ_SEARCH_SCOPE); SSOUtils.validateClientAcceptHeader(request); SSOUtils.validateClientRequest(request, clientIdAndSecret[0], clientIdAndSecret[1], null, null); if (isSearchAuthzRequest || isPublicSearchAuthzRequest) { validateQueryType(request); } if (!isPublicSearchAuthzRequest) { String token = SSOUtils.getRequestParameter(request, SSOConstants.HTTP_PARAM_TOKEN); SSOUtils.validateRequestScope(request, token, scope); SSOUtils.getSsoSession(request, clientIdAndSecret[0], token, true) .getAssociatedClientIds() .add(clientIdAndSecret[0]); } log.debug("Sending json response"); SSOUtils.sendJsonData(response, isValidateRequest ? Collections.<String, Object>emptyMap() : isSearchAuthzRequest || isPublicSearchAuthzRequest ? buildSearchResponse(request, isPublicSearchAuthzRequest) : buildResponse(request, clientIdAndSecret[0], scope)); } catch(OAuthException ex) { SSOUtils.sendJsonDataWithMessage(response, ex, isValidateRequest); } catch(Exception ex) { SSOUtils.sendJsonDataWithMessage(response, SSOConstants.ERR_CODE_SERVER_ERROR, ex); } }