containers/hawkular-openshift-security-filter/src/main/java/org/hawkular/openshift/auth/TokenAuthenticator.java
private boolean isQuery(HttpServerExchange serverExchange) {
        if (serverExchange.getRequestMethod().toString().equalsIgnoreCase("GET") || serverExchange.getRequestMethod().toString().equalsIgnoreCase("HEAD")) {
            // all GET requests are considered queries
            return true;
        } else if (serverExchange.getRequestMethod().toString().equalsIgnoreCase("POST")) {
            // some POST requests may be queries we need to check.
            if (postQuery != null && postQuery.matcher(serverExchange.getRelativePath()).find()) {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }
private boolean isQuery(HttpServerExchange serverExchange) {
        if (serverExchange.getRequestMethod().toString().equalsIgnoreCase("GET") || serverExchange.getRequestMethod().toString().equalsIgnoreCase("HEAD")) {
            // all GET requests are considered queries
            return true;
        } else if (serverExchange.getRequestMethod().toString().equalsIgnoreCase("POST")) {
            // some POST requests may be queries we need to check.
            if (postQuery != null && postQuery.matcher(serverExchange.getRelativePath()).find()) {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }
private boolean isQuery ( HttpServerExchange serverExchange ) { if ( serverExchange . getRequestMethod ( ) . toString ( ) . equalsIgnoreCase ( "GET" ) || serverExchange . getRequestMethod ( ) . toString ( ) . equalsIgnoreCase ( "HEAD" ) ) { // all GET requests are considered queries return true ; } else if ( serverExchange . getRequestMethod ( ) . toString ( ) . equalsIgnoreCase ( "POST" ) ) { // some POST requests may be queries we need to check. if ( postQuery != null && postQuery . matcher ( serverExchange . getRelativePath ( ) ) . find ( ) ) { return true ; } else { return false ; } } else { return false ; } }
Returns if the request is a query request, eg to perform a READ
Returns if the request is a query request eg to perform a READ