code: private boolean hasAuthenticatedMolgenisToken() {
      boolean hasAuthenticatedMolgenisToken = false;
      Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
      if (authentication instanceof RestAuthenticationToken) {
        hasAuthenticatedMolgenisToken = authentication.isAuthenticated();
      }
      return hasAuthenticatedMolgenisToken;
    }
docs: Check on authenticated RestAuthenticationToken
  
  @return authenticated {@link RestAuthenticationToken}