File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ Date exp = payload.getExpirationTime();
208208Date nbf = payload. getNotBefore();
209209String [] audience = payload. getAudience();
210210
211- Object customClaim = payload. getClaim(" username" );
211+ String customClaim = payload. getClaim(" username" , String . class );
212212
213213boolean hasClaim = payload. containsClaim(" key" );
214214```
@@ -245,7 +245,7 @@ JWTValidator validator = new DefaultJWTValidator.Builder()
245245 .withIssuer(" issuer" )
246246 .withID(" id" )
247247 .withOneOfAudience(" aud1" , " aud2" ) // Enforce audience has "aud1" or "aud2"
248- .withCLaim (" username" , " BastiaanJansen" ) // Enforce custom claim value
248+ .withClaim (" username" , " BastiaanJansen" ) // Enforce custom claim value
249249 .build();
250250
251251try {
You can’t perform that action at this time.
0 commit comments