Skip to content

Commit f36e2fc

Browse files
committed
Remove SingleKeyJWSKeySelector
Closes gh-9348
1 parent 65d3b0d commit f36e2fc

File tree

4 files changed

+6
-62
lines changed

4 files changed

+6
-62
lines changed

oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/NimbusJwtDecoder.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -42,6 +42,7 @@
4242
import com.nimbusds.jose.proc.JWSKeySelector;
4343
import com.nimbusds.jose.proc.JWSVerificationKeySelector;
4444
import com.nimbusds.jose.proc.SecurityContext;
45+
import com.nimbusds.jose.proc.SingleKeyJWSKeySelector;
4546
import com.nimbusds.jose.util.Resource;
4647
import com.nimbusds.jose.util.ResourceRetriever;
4748
import com.nimbusds.jwt.JWT;

oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/NimbusReactiveJwtDecoder.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -42,6 +42,7 @@
4242
import com.nimbusds.jose.proc.JWSKeySelector;
4343
import com.nimbusds.jose.proc.JWSVerificationKeySelector;
4444
import com.nimbusds.jose.proc.SecurityContext;
45+
import com.nimbusds.jose.proc.SingleKeyJWSKeySelector;
4546
import com.nimbusds.jwt.JWT;
4647
import com.nimbusds.jwt.JWTClaimsSet;
4748
import com.nimbusds.jwt.JWTParser;

oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/SingleKeyJWSKeySelector.java

-57
This file was deleted.

oauth2/oauth2-jose/src/test/java/org/springframework/security/oauth2/jwt/NimbusJwtDecoderTests.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -503,8 +503,7 @@ public void decodeWhenUsingSecretKeyAndIncorrectAlgorithmThenThrowsJwtException(
503503
.macAlgorithm(MacAlgorithm.HS512)
504504
.build();
505505
assertThatExceptionOfType(BadJwtException.class)
506-
.isThrownBy(() -> decoder.decode(signedJWT.serialize()))
507-
.withMessageContaining("Unsupported algorithm of HS256");
506+
.isThrownBy(() -> decoder.decode(signedJWT.serialize()));
508507
// @formatter:on
509508
}
510509

0 commit comments

Comments
 (0)