class PaullEndpoint {

    PaullSoapToken getToken(String sessionID) {

        if (sessionID != null) {

            try {
                String token = externalRestService.getPaullConnection(sessionID).get("token").asText();
                Claims tokenClaim = Jwts.parser().setSigningKey(SECRET).parseClaimsJws(token).getBody();
                if (tokenClaim.getExpiration().before(new Date())) {
                    return null;
                }
                String tokenParsed = tokenClaim.getSubject();

                ObjectMapper objectMapper = new ObjectMapper();
                return objectMapper.readValue(tokenParsed, PaullSoapToken.class);
            } catch (IOException e) {
                LOGGER.error(e.getMessage());
                return null;
            }

        }
        return null;
    }

    public  PaullEndpoint(PesAllerService pesAllerService, LocalAuthorityService localAuthorityService,
            ExternalRestService externalRestService, PesRetourService pesRetourService, SesileService sesileService);

}