class TokenService {

    @PreAuthorize("hasAuthority('VIEW_KEYS')")
    public TokenInfo getToken(String id) throws TokenNotFoundException {
        try {
            return signerProxyFacade.getToken(id);
        } catch (CodedException e) {
            if (isCausedByTokenNotFound(e)) {
                throw new TokenNotFoundException(e);
            } else {
                throw e;
            }
        } catch (Exception other) {
            throw new RuntimeException("get token failed", other);
        }
    }

    @Autowired public  TokenService(SignerProxyFacade signerProxyFacade);

}