code: public String updateScope(FullHttpRequest req, String scopeName) throws OAuthException {
          String contentType = (req.headers() != null) ? req.headers().get(HttpHeaderNames.CONTENT_TYPE) : null;
          // check Content-Type
          if (contentType != null && contentType.contains(ResponseBuilder.APPLICATION_JSON)) {
              try {
                  Scope scope = InputValidator.validate(req.content().toString(CharsetUtil.UTF_8), Scope.class);
                  if (scope.validForUpdate()) {
                      Scope foundScope = DBManagerFactory.getInstance().findScope(scopeName).blockingGet();
                      if (foundScope == null) {
                          LOG.error("scope does not exist");
                          throw new OAuthException(SCOPE_NOT_EXIST, HttpResponseStatus.BAD_REQUEST);
                      } else {
                          setScopeEmptyValues(scope, foundScope);
                          DBManagerFactory.getInstance().storeScope(scope);
                      }
                  } else {
                      LOG.error("scope is not valid");
                      throw new OAuthException(MANDATORY_SCOPE_ERROR, HttpResponseStatus.BAD_REQUEST);
                  }
              } catch (Exception e) {
                  LOG.error("cannot handle scope request", e);
                  throw new OAuthException(e, null, HttpResponseStatus.BAD_REQUEST);
              }
          } else {
              throw new OAuthException(ResponseBuilder.UNSUPPORTED_MEDIA_TYPE, HttpResponseStatus.BAD_REQUEST);
          }
          return SCOPE_UPDATED_OK_MESSAGE;
      }
docs: Updates a scope. If the scope does not exists, returns an error.
  
  @param req http request
  @return String message that will be returned in the response