class GetAuthenticationTokenAPIController {

    @RequestMapping(method = RequestMethod.GET, produces = MediaType.TEXT_PLAIN_VALUE)
    @ResponseBody
    public String authenticationtoken(Authentication authentication)
    {
        log.debug("Storing authentication token for user: '" + authentication.getName() + "'");

        String token = getAuthenticationTokenService().getTokenForAuthentication(authentication);
        return token;
    }

}