@@ -130,7 +130,7 @@ public void setClaimSetConverter(Converter<Map<String, Object>, Map<String, Obje
130
130
* Decode and validate the JWT from its compact claims representation format
131
131
* @param token the JWT value
132
132
* @return a validated {@link Jwt}
133
- * @throws JwtException
133
+ * @throws JwtException when the token is malformed or otherwise invalid
134
134
*/
135
135
@ Override
136
136
public Jwt decode (String token ) throws JwtException {
@@ -274,14 +274,14 @@ public static final class JwkSetUriJwtDecoderBuilder {
274
274
private static final JOSEObjectTypeVerifier <SecurityContext > NO_TYPE_VERIFIER = (header , context ) -> {
275
275
};
276
276
277
- private Function <RestOperations , String > jwkSetUri ;
277
+ private final Function <RestOperations , String > jwkSetUri ;
278
278
279
279
private Function <JWKSource <SecurityContext >, Set <JWSAlgorithm >> defaultAlgorithms = (source ) -> Set
280
280
.of (JWSAlgorithm .RS256 );
281
281
282
282
private JOSEObjectTypeVerifier <SecurityContext > typeVerifier = JWT_TYPE_VERIFIER ;
283
283
284
- private Set <SignatureAlgorithm > signatureAlgorithms = new HashSet <>();
284
+ private final Set <SignatureAlgorithm > signatureAlgorithms = new HashSet <>();
285
285
286
286
private RestOperations restOperations = new RestTemplate ();
287
287
@@ -336,9 +336,7 @@ private JwkSetUriJwtDecoderBuilder(Function<RestOperations, String> jwkSetUri,
336
336
*
337
337
* <p>
338
338
* The difference is that by setting this to {@code false}, it allows you to
339
- * provide validation by type, like for {@code at+jwt}:
340
- *
341
- * <code>
339
+ * provide validation by type, like for {@code at+jwt}: <code>
342
340
* NimbusJwtDecoder jwtDecoder = NimbusJwtDecoder.withIssuerLocation(issuer)
343
341
* .validateType(false)
344
342
* .build();
@@ -387,8 +385,8 @@ public JwkSetUriJwtDecoderBuilder jwsAlgorithms(Consumer<Set<SignatureAlgorithm>
387
385
* <a href="https://tools.ietf.org/html/rfc7517#section-5">JWK Set</a> uri as well
388
386
* as the <a href=
389
387
* "https://openid.net/specs/openid-connect-core-1_0.html#IssuerIdentifier">Issuer</a>.
390
- * @param restOperations
391
- * @return
388
+ * @param restOperations the {@link RestOperations} instance to use
389
+ * @return a {@link JwkSetUriJwtDecoderBuilder} for further configurations
392
390
*/
393
391
public JwkSetUriJwtDecoderBuilder restOperations (RestOperations restOperations ) {
394
392
Assert .notNull (restOperations , "restOperations cannot be null" );
@@ -551,7 +549,7 @@ public static final class PublicKeyJwtDecoderBuilder {
551
549
552
550
private JOSEObjectTypeVerifier <SecurityContext > typeVerifier = JWT_TYPE_VERIFIER ;
553
551
554
- private RSAPublicKey key ;
552
+ private final RSAPublicKey key ;
555
553
556
554
private Consumer <ConfigurableJWTProcessor <SecurityContext >> jwtProcessorCustomizer ;
557
555
@@ -593,9 +591,7 @@ private PublicKeyJwtDecoderBuilder(RSAPublicKey key) {
593
591
*
594
592
* <p>
595
593
* The difference is that by setting this to {@code false}, it allows you to
596
- * provide validation by type, like for {@code at+jwt}:
597
- *
598
- * <code>
594
+ * provide validation by type, like for {@code at+jwt}: <code>
599
595
* NimbusJwtDecoder jwtDecoder = NimbusJwtDecoder.withIssuerLocation(issuer)
600
596
* .validateType(false)
601
597
* .build();
@@ -614,9 +610,7 @@ public PublicKeyJwtDecoderBuilder validateType(boolean shouldValidateTypHeader)
614
610
/**
615
611
* Use the given signing
616
612
* <a href="https://tools.ietf.org/html/rfc7515#section-4.1.1" target=
617
- * "_blank">algorithm</a>.
618
- *
619
- * The value should be one of
613
+ * "_blank">algorithm</a>. The value should be one of
620
614
* <a href="https://tools.ietf.org/html/rfc7518#section-3.3" target=
621
615
* "_blank">RS256, RS384, or RS512</a>.
622
616
* @param signatureAlgorithm the algorithm to use
@@ -725,9 +719,7 @@ private SecretKeyJwtDecoderBuilder(SecretKey secretKey) {
725
719
*
726
720
* <p>
727
721
* The difference is that by setting this to {@code false}, it allows you to
728
- * provide validation by type, like for {@code at+jwt}:
729
- *
730
- * <code>
722
+ * provide validation by type, like for {@code at+jwt}: <code>
731
723
* NimbusJwtDecoder jwtDecoder = NimbusJwtDecoder.withIssuerLocation(issuer)
732
724
* .validateType(false)
733
725
* .build();
@@ -746,9 +738,7 @@ public SecretKeyJwtDecoderBuilder validateType(boolean shouldValidateTypHeader)
746
738
/**
747
739
* Use the given
748
740
* <a href="https://tools.ietf.org/html/rfc7515#section-4.1.1" target=
749
- * "_blank">algorithm</a> when generating the MAC.
750
- *
751
- * The value should be one of
741
+ * "_blank">algorithm</a> when generating the MAC. The value should be one of
752
742
* <a href="https://tools.ietf.org/html/rfc7518#section-3.2" target=
753
743
* "_blank">HS256, HS384 or HS512</a>.
754
744
* @param macAlgorithm the MAC algorithm to use
0 commit comments