public boolean isValidToken ( ) { try { // Response response = wsBase.path(TEST_CONFIGS).request(MediaType.APPLICATION_JSON_TYPE).get(); // return response.getStatusInfo().getFamily() == Response.Status.Family.SUCCESSFUL; LoadZone zone = getLoadZone ( LoadZone . AMAZON_US_ASHBURN . uid ) ; return zone == LoadZone . AMAZON_US_ASHBURN ; } catch ( Exception e ) { log . info ( "API token validation failed: " + e ) ; } return false ; }
Returns true if we can successfully logon and fetch some data .