Skip to content

Commit a721e37

Browse files
authored
Merge pull request #5265 from sberyozkin/smallrye_jwt_2.0.10
Update to smallrye-jwt-2.0.10
2 parents 37bdc97 + 4c3232f commit a721e37

File tree

3 files changed

+3
-41
lines changed

3 files changed

+3
-41
lines changed

bom/runtime/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<smallrye-open-api.version>1.1.19</smallrye-open-api.version>
3838
<smallrye-opentracing.version>1.3.2</smallrye-opentracing.version>
3939
<smallrye-fault-tolerance.version>2.1.2</smallrye-fault-tolerance.version>
40-
<smallrye-jwt.version>2.0.9</smallrye-jwt.version>
40+
<smallrye-jwt.version>2.0.10</smallrye-jwt.version>
4141
<smallrye-context-propagation.version>1.0.11</smallrye-context-propagation.version>
4242
<smallrye-reactive-streams-operators.version>1.0.10</smallrye-reactive-streams-operators.version>
4343
<smallrye-converter-api.version>1.0.10</smallrye-converter-api.version>

extensions/oidc/runtime/src/main/java/io/quarkus/oidc/runtime/OidcJsonWebTokenProducer.java

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package io.quarkus.oidc.runtime;
22

3-
import java.util.Set;
4-
53
import javax.annotation.Priority;
64
import javax.enterprise.context.RequestScoped;
75
import javax.enterprise.inject.Alternative;
@@ -16,6 +14,7 @@
1614
import io.quarkus.oidc.IdToken;
1715
import io.quarkus.security.credential.TokenCredential;
1816
import io.quarkus.security.identity.SecurityIdentity;
17+
import io.smallrye.jwt.auth.cdi.NullJsonWebToken;
1918

2019
@Priority(2)
2120
@Alternative
@@ -78,22 +77,4 @@ private JsonWebToken getTokenCredential(Class<? extends TokenCredential> type) {
7877
}
7978
throw new IllegalStateException("Current identity not associated with an access token");
8079
}
81-
82-
private static class NullJsonWebToken implements JsonWebToken {
83-
84-
@Override
85-
public String getName() {
86-
return null;
87-
}
88-
89-
@Override
90-
public Set<String> getClaimNames() {
91-
return null;
92-
}
93-
94-
@Override
95-
public <T> T getClaim(String claimName) {
96-
return null;
97-
}
98-
}
9980
}
Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package io.quarkus.smallrye.jwt.runtime.auth;
22

3-
import java.util.Set;
4-
53
import javax.annotation.Priority;
64
import javax.enterprise.context.RequestScoped;
75
import javax.enterprise.inject.Alternative;
@@ -11,6 +9,7 @@
119
import org.eclipse.microprofile.jwt.JsonWebToken;
1210

1311
import io.quarkus.security.identity.SecurityIdentity;
12+
import io.smallrye.jwt.auth.cdi.NullJsonWebToken;
1413

1514
@Priority(1)
1615
@Alternative
@@ -36,22 +35,4 @@ JsonWebToken currentJWTPrincipalOrNull() {
3635
}
3736
throw new IllegalStateException("Current principal " + identity.getPrincipal() + " is not a JSON web token");
3837
}
39-
40-
private static class NullJsonWebToken implements JsonWebToken {
41-
42-
@Override
43-
public String getName() {
44-
return null;
45-
}
46-
47-
@Override
48-
public Set<String> getClaimNames() {
49-
return null;
50-
}
51-
52-
@Override
53-
public <T> T getClaim(String claimName) {
54-
return null;
55-
}
56-
}
5738
}

0 commit comments

Comments
 (0)