class SimpleTokenManager implements TokenManager {

    @Override
    public Optional<SignedJWT> verifyToken(String tokenString) {
        for (TokenVerifier verifier : verifiers.values()) {
            LOG.debug("Verifying Token with " + verifier.getName());
            try {
                Optional<SignedJWT> signedJWT = verifier.verifyToken(tokenString);
                if (signedJWT.isPresent()) {
                    LOG.debug("Token verified with " + verifier.getName());
                    return signedJWT;
                } else {
                    LOG.debug("Token could not be verified with " + verifier.getName());
                }
            } catch (Exception ex) {
                LOG.debug("Token could not be verified with " + verifier.getName());
            }
        }
        return Optional.empty();
    }

}