class FetchAndUnzipProcess implements GeoServerProcess {

    boolean isAuthorized(String token){
        boolean authorized = false;
        String expectedToken = getProperties().getProperty(TOKEN_PROPERTY_NAME);
        if(null == expectedToken){
            throw new ProcessException(
                "Could not determine expected value for token. Please ensure that " + TOKEN_PROPERTY_NAME + " is defined on the server."
            );
        } else if(expectedToken.equals(token)){
            //overwrite the expected value right away
            expectedToken = null;
            authorized = true;
        }
        return authorized;
    }

}