Package com.codename1.backend.security.oauth2.jwt


package com.codename1.backend.security.oauth2.jwt

JSON Web Tokens signed with a public key algorithm or a shared secret: JwtDecoder verifies one and reads its claims, JwtEncoder makes one.

JwtDecoder decoder = JwtDecoders.fromIssuerLocation("https://accounts.example.com");
Jwt jwt = decoder.decode(token);       // BadJwtException says why not
String user = jwt.getSubject();

Which algorithm verifies a token is settled by the key the decoder holds and the algorithms it was told to accept, and the token's own alg header has to agree with both. A token that says none, or says HS256 to a decoder that holds an RSA public key, is refused before anything is computed.

com.codename1.backend.Jwt is not part of this: it issues and checks HS256 tokens between a server and itself, and stays as it is.