code: public AccessLevel getAccessLevel(String token, String applicationId)
  			throws CloudFoundryAuthorizationException {
  		try {
  			URI uri = getPermissionsUri(applicationId);
  			RequestEntity<?> request = RequestEntity.get(uri)
  					.header("Authorization", "bearer " + token).build();
  			Map<?, ?> body = this.restTemplate.exchange(request, Map.class).getBody();
  			if (Boolean.TRUE.equals(body.get("read_sensitive_data"))) {
  				return AccessLevel.FULL;
  			}
  			return AccessLevel.RESTRICTED;
  		}
  		catch (HttpClientErrorException ex) {
  			if (ex.getStatusCode().equals(HttpStatus.FORBIDDEN)) {
  				throw new CloudFoundryAuthorizationException(Reason.ACCESS_DENIED,
  						"Access denied");
  			}
  			throw new CloudFoundryAuthorizationException(Reason.INVALID_TOKEN,
  					"Invalid token", ex);
  		}
  		catch (HttpServerErrorException ex) {
  			throw new CloudFoundryAuthorizationException(Reason.SERVICE_UNAVAILABLE,
  					"Cloud controller not reachable");
  		}
  	}
docs: Return the access level that should be granted to the given token.
  @param token the token
  @param applicationId the cloud foundry application ID
  @return the access level that should be granted
  @throws CloudFoundryAuthorizationException if the token is not authorized