class AuthenticationService {

    public LoginToken authenticate(String username, String password) {
        // TODO use REST template to communicate the backend
        RestTemplate restTemplate = new RestTemplate();

        MultiValueMap<String, String> multiValueMap = new LinkedMultiValueMap<>();
        multiValueMap.add("username", username);
        multiValueMap.add("password", password);
        LoginToken loginToken = restTemplate.postForObject(authUrl, multiValueMap, LoginToken.class);

        return loginToken;
    }

}