In this post under JJWT, I will explain with example, how to verify or assert the presence of custom (user created and added) claim in JWT token. JJWT framework provides a method through which1) we can verify whether a custom claim exist in the JWT or not.2) we can verify whether a custom claim’s value…… Continue reading Asserting the presence of a custom claim in JWT
Month: November 2022
Asserting the presence of a standard claim in JWT
In this post under JJWT, I will explain with example, how to verify or assert the presence of standard claim in JWT token. JJWT framework provides a list of methods through which1) we can verify whether a standard claim exist in the JWT or not.2) we can verify whether a standard claim’s value is equal…… Continue reading Asserting the presence of a standard claim in JWT
AssertSame Example
In this post under JUnit, I will show with example the purpose of AssertSame assertion method. JUnit 5 has added new assertion method “assertSame” that checks for Object reference equality. How “assertSame” is different from “assertEquals” assertion method is that latter check for Object value equality whereas former checks for Object reference equality. Object value…… Continue reading AssertSame Example
Configuring UniformRandomBackOffPolicy (using annotations)
In this post, under Spring Retry I will show with example how to configure UniformRandomBackOffPolicy using annotations For our example we will use the below service class Service class 1 package defaultPackage; 2 3 import java.util.Date; 4 5 import org.springframework.retry.annotation.Backoff; 6 import org.springframework.retry.annotation.Retryable; 7 import org.springframework.stereotype.Service; 8 9 @Service 10 public class Service14 { 11…… Continue reading Configuring UniformRandomBackOffPolicy (using annotations)