@@ -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
@@ -337,9 +337,7 @@ private JwkSetUriJwtDecoderBuilder(Function<RestOperations, String> jwkSetUri,
337
337
*
338
338
* <p>
339
339
* The difference is that by setting this to {@code false}, it allows you to
340
- * provide validation by type, like for {@code at+jwt}:
341
- *
342
- * <code>
340
+ * provide validation by type, like for {@code at+jwt}: <code>
343
341
* NimbusJwtDecoder jwtDecoder = NimbusJwtDecoder.withIssuerLocation(issuer)
344
342
* .validateType(false)
345
343
* .build();
@@ -388,8 +386,8 @@ public JwkSetUriJwtDecoderBuilder jwsAlgorithms(Consumer<Set<SignatureAlgorithm>
388
386
* <a href="https://tools.ietf.org/html/rfc7517#section-5">JWK Set</a> uri as well
389
387
* as the <a href=
390
388
* "https://openid.net/specs/openid-connect-core-1_0.html#IssuerIdentifier">Issuer</a>.
391
- * @param restOperations
392
- * @return
389
+ * @param restOperations the {@link RestOperations} instance to use
390
+ * @return a {@link JwkSetUriJwtDecoderBuilder} for further configurations
393
391
*/
394
392
public JwkSetUriJwtDecoderBuilder restOperations (RestOperations restOperations ) {
395
393
Assert .notNull (restOperations , "restOperations cannot be null" );
@@ -552,7 +550,7 @@ public static final class PublicKeyJwtDecoderBuilder {
552
550
553
551
private JOSEObjectTypeVerifier <SecurityContext > typeVerifier = JWT_TYPE_VERIFIER ;
554
552
555
- private RSAPublicKey key ;
553
+ private final RSAPublicKey key ;
556
554
557
555
private Consumer <ConfigurableJWTProcessor <SecurityContext >> jwtProcessorCustomizer ;
558
556
@@ -595,9 +593,7 @@ private PublicKeyJwtDecoderBuilder(RSAPublicKey key) {
595
593
*
596
594
* <p>
597
595
* The difference is that by setting this to {@code false}, it allows you to
598
- * provide validation by type, like for {@code at+jwt}:
599
- *
600
- * <code>
596
+ * provide validation by type, like for {@code at+jwt}: <code>
601
597
* NimbusJwtDecoder jwtDecoder = NimbusJwtDecoder.withIssuerLocation(issuer)
602
598
* .validateType(false)
603
599
* .build();
@@ -616,9 +612,7 @@ public PublicKeyJwtDecoderBuilder validateType(boolean shouldValidateTypHeader)
616
612
/**
617
613
* Use the given signing
618
614
* <a href="https://tools.ietf.org/html/rfc7515#section-4.1.1" target=
619
- * "_blank">algorithm</a>.
620
- *
621
- * The value should be one of
615
+ * "_blank">algorithm</a>. The value should be one of
622
616
* <a href="https://tools.ietf.org/html/rfc7518#section-3.3" target=
623
617
* "_blank">RS256, RS384, or RS512</a>.
624
618
* @param signatureAlgorithm the algorithm to use
@@ -728,9 +722,7 @@ private SecretKeyJwtDecoderBuilder(SecretKey secretKey) {
728
722
*
729
723
* <p>
730
724
* The difference is that by setting this to {@code false}, it allows you to
731
- * provide validation by type, like for {@code at+jwt}:
732
- *
733
- * <code>
725
+ * provide validation by type, like for {@code at+jwt}: <code>
734
726
* NimbusJwtDecoder jwtDecoder = NimbusJwtDecoder.withIssuerLocation(issuer)
735
727
* .validateType(false)
736
728
* .build();
@@ -749,9 +741,7 @@ public SecretKeyJwtDecoderBuilder validateType(boolean shouldValidateTypHeader)
749
741
/**
750
742
* Use the given
751
743
* <a href="https://tools.ietf.org/html/rfc7515#section-4.1.1" target=
752
- * "_blank">algorithm</a> when generating the MAC.
753
- *
754
- * The value should be one of
744
+ * "_blank">algorithm</a> when generating the MAC. The value should be one of
755
745
* <a href="https://tools.ietf.org/html/rfc7518#section-3.2" target=
756
746
* "_blank">HS256, HS384 or HS512</a>.
757
747
* @param macAlgorithm the MAC algorithm to use
0 commit comments