code: public Subscription getSubscriptionFromRequest(HttpServletRequest request) {
  		String tokenHeader = request.getHeader("Authorization");
  
  		if (tokenHeader == null || tokenHeader.indexOf("Token ") != 0) {
  			LOG.info("Empty authorizationheader, or header does not start with 'Token ': " + tokenHeader);
  			return null;
  		}
  
  		String tokenValue = tokenHeader.substring(tokenHeader.indexOf(" ")).trim();
  		LOG.info("Token value: " + tokenValue);
  
  		if (tokenValue != null) {
  			return subscriptionService.findSubscriptionByAuthorizationToken(tokenValue);
  		}
  		return null;
  	}
docs: Finds Subscription object based on request.
  
  @param request
  request that should contain the authorization value
  @return subscription object if it can be found for the token value
  extracted from the request.