Nimbus covers JWS, JWE, JWK and JWT with two layers: low-level objects (SignedJWT, ECDSASigner, MACVerifier) and the DefaultJWTProcessor, which ties key selection, signature checks and claims checks together. Spring Security's resource server is built on it, so its defaults are what most Spring APIs enforce.
With the processor, the JWSVerificationKeySelector is the allow-list: configured for ES256, it refused an RS256 token and an HS256 token keyed with the EC key's PEM text with Another algorithm expected, or no matching key(s) found, and without any selector it refuses everything. Unsigned tokens are rejected (Unsecured (plain) JWTs are rejected, extend class to handle). The low-level API has no such protection — a MACVerifier built from the PEM text verified that forged HS256 token — so code that picks a verifier from the token's header recreates the classic confusion bug. Use the processor, as the sample does.
DefaultJWTClaimsVerifier allows 60 seconds of clock skew by default, and exp is optional unless listed as a required claim — the sample requires sub and exp and pins the issuer. ES256 refuses a P-384 key (The ES256 algorithm is not allowed or supported by the JWS signer), and a DER-encoded signature simply fails to verify; check the signature length with the JWT debugger.
Version 10.10 round-tripped the HS, RS, PS and ES families plus EdDSA and the newer Ed25519 name. Ed25519 needs Google Tink on the classpath: without it, signing failed with NoClassDefFoundError: com/google/crypto/tink/subtle/Ed25519Sign$KeyPair. ES256K needs a provider with secp256k1 such as Bouncy Castle, since the JDK has none.
To check what an identity provider publishes, use the JWKS checker; for encrypted tokens, the JWE inspector.