class LocalAuthorityController {

    @GetMapping("/{siren}/accessToken")
    public ResponseEntity<String> getAccessToken(@PathVariable String siren) {
        Optional<TokenResponse> tokenResponse = localAuthorityService.getAccessTokenFromKernel(siren);

        return tokenResponse
                .map(tokenResponse1 -> new ResponseEntity<>(tokenResponse1.getAccessToken(), HttpStatus.OK))
                .orElseGet(() -> new ResponseEntity<>(HttpStatus.BAD_REQUEST));
    }

    public  LocalAuthorityController(LocalAuthorityService localAuthorityService, ProfileService profileService,
            WorkGroupService workGroupService);

}