@ -88,16 +88,11 @@ public final class NimbusJwtEncoder implements JwtEncoder {
@@ -88,16 +88,11 @@ public final class NimbusJwtEncoder implements JwtEncoder {
"Failed to select a key since there are multiple for the signing algorithm [%s]; "+
"please specify a selector in NimbusJwsEncoder#setJwkSelector",jwks.get(0).getAlgorithm()));
}
if(jwks.isEmpty()){
thrownewJwtEncodingException(
String.format(ENCODING_ERROR_MESSAGE_TEMPLATE,"Failed to select a JWK signing key"));
}
returnjwks.get(0);
String.format(
"Failed to select a key since there are multiple for the signing algorithm [%s]; "
+"please specify a selector in NimbusJwsEncoder#setJwkSelector",
jwks.get(0).getAlgorithm()));
};
/**
@ -108,16 +103,19 @@ public final class NimbusJwtEncoder implements JwtEncoder {
@@ -108,16 +103,19 @@ public final class NimbusJwtEncoder implements JwtEncoder {
Assert.notNull(jwkSource,"jwkSource cannot be null");
Assert.notNull(jwkSelector,"jwkSelector cannot be null");
this.jwkSelector=jwkSelector;
}
@ -149,6 +147,13 @@ public final class NimbusJwtEncoder implements JwtEncoder {
@@ -149,6 +147,13 @@ public final class NimbusJwtEncoder implements JwtEncoder {