Auth0 Home Blog Docs

Algorithm.RSA method deprecation warning

token-validation
rsa256

#1

We are using this method for validating the JWT before granting access to our API.
But recently we are getting a warning as below :

 warning: [deprecation] RSA256(RSAKey) in Algorithm has been deprecated

Is the support for this method going to be removed in the coming upgrades?
Please let us know in case we need to opt for some other solution.


#2

Can you please provide more details about where are you getting that warning?


#3

After every build.


#4

Can you provide more details about your general setup? the code you’re using, the libraries (and versions) that you’re using?


#5

I am using JAVA SDK with the following libraries -

  • java-jwt-3.3.0.jar

  • jwks-rsa-0.1.0.jar

and the following code segment -

Jwk jwk = provider.get(keyId);
            RSAPublicKey publicKey = (RSAPublicKey) jwk.getPublicKey();
            Algorithm algorithm = Algorithm.RSA256(publicKey);
            JWTVerifier verifier = JWT.require(algorithm)
                    .withAudience(audience)  
                    .build();

#6

As per the discussion here

Updating the jwks jar to the latest version resolved my issue. (jwks-rsa-0.3.0.jar)