[java-idp-plugin-oidc-rp] branch main updated: JCOMOIDC-60 - JWT class naming convention
Phil Smart
philip.smart at jisc.ac.uk
Wed Jan 11 16:18:06 UTC 2023
This is an automated email from the git hooks/post-receive script.
philsmart pushed a commit to branch main
in repository java-idp-plugin-oidc-rp.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-plugin-oidc-rp.git;a=commit;h=3b31352f2471c3efeb56e760de540f53c757e395
The following commit(s) were added to refs/heads/main by this push:
new 3b31352 JCOMOIDC-60 - JWT class naming convention
3b31352 is described below
commit 3b31352f2471c3efeb56e760de540f53c757e395
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Wed Jan 11 16:18:03 2023 +0000
JCOMOIDC-60 - JWT class naming convention
- Update RP to work with latest commons name changes
https://shibboleth.atlassian.net/browse/JCOMOIDC-60
---
.../idp/plugin/authn/oidc/rp/impl/DecryptJWT.java | 22 +++++++++++-----------
...RelyingPartyProxySigningParametersResolver.java | 2 +-
.../oidc/rp/impl/AuthorizationControllerTest.java | 4 ++--
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/DecryptJWT.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/DecryptJWT.java
index bc50a06..c791799 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/DecryptJWT.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/DecryptJWT.java
@@ -38,9 +38,9 @@ import com.nimbusds.jwt.JWT;
import net.shibboleth.idp.profile.AbstractProfileAction;
import net.shibboleth.oidc.profile.core.OidcEventIds;
-import net.shibboleth.oidc.security.context.JWTSecurityParametersContext;
-import net.shibboleth.oidc.security.impl.JWTDecrypter;
+import net.shibboleth.oidc.security.impl.OIDCTokenDecrypter;
import net.shibboleth.oidc.security.jose.DecryptionParameters;
+import net.shibboleth.oidc.security.jose.context.SecurityParametersContext;
import net.shibboleth.utilities.java.support.annotation.constraint.NonnullAfterInit;
import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
import net.shibboleth.utilities.java.support.component.ComponentSupport;
@@ -71,27 +71,27 @@ public class DecryptJWT extends AbstractProfileAction {
@Nullable private EncryptedJWT encryptedJwt;
/** The decryption object. */
- @Nullable private JWTDecrypter decrypter;
+ @Nullable private OIDCTokenDecrypter decrypter;
- /** Strategy used to locate the {@link JWTSecurityParametersContext}. */
- @Nonnull private Function<ProfileRequestContext, JWTSecurityParametersContext> securityParamsLookupStrategy;
+ /** Strategy used to locate the {@link SecurityParametersContext}. */
+ @Nonnull private Function<ProfileRequestContext, SecurityParametersContext> securityParamsLookupStrategy;
/** Constructor.*/
public DecryptJWT() {
securityParamsLookupStrategy =
- new ChildContextLookup<>(JWTSecurityParametersContext.class).compose(
+ new ChildContextLookup<>(SecurityParametersContext.class).compose(
new InboundMessageContextLookup());
}
/**
- * Set the strategy used to locate the {@link JWTSecurityParametersContext} associated with a given
+ * Set the strategy used to locate the {@link SecurityParametersContext} associated with a given
* {@link ProfileRequestContext}.
*
- * @param strategy strategy used to locate the {@link JWTSecurityParametersContext} associated with a given
+ * @param strategy strategy used to locate the {@link SecurityParametersContext} associated with a given
* {@link ProfileRequestContext}
*/
public void setSecurityParametersContextLookupStrategy(
- @Nonnull final Function<ProfileRequestContext, JWTSecurityParametersContext> strategy) {
+ @Nonnull final Function<ProfileRequestContext, SecurityParametersContext> strategy) {
ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
securityParamsLookupStrategy =
@@ -149,14 +149,14 @@ public class DecryptJWT extends AbstractProfileAction {
return false;
}
- final JWTSecurityParametersContext paramsCtx = securityParamsLookupStrategy.apply(profileRequestContext);
+ final SecurityParametersContext paramsCtx = securityParamsLookupStrategy.apply(profileRequestContext);
if (paramsCtx == null || paramsCtx.getDecryptionParameters() == null) {
log.debug("{} No security parameter context or decryption parameters", getLogPrefix());
ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_SEC_CFG);
return false;
} else {
final DecryptionParameters params = paramsCtx.getDecryptionParameters();
- decrypter = new JWTDecrypter(params);
+ decrypter = new OIDCTokenDecrypter(params);
}
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/RelyingPartyProxySigningParametersResolver.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/RelyingPartyProxySigningParametersResolver.java
index 9821b7a..a606032 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/RelyingPartyProxySigningParametersResolver.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/RelyingPartyProxySigningParametersResolver.java
@@ -37,9 +37,9 @@ import com.nimbusds.jose.JWSAlgorithm;
import com.nimbusds.jose.jwk.Curve;
import com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata;
-import net.shibboleth.oidc.security.credential.impl.CredentialConversionUtil;
import net.shibboleth.oidc.security.criterion.ProviderMetadataCriterion;
import net.shibboleth.oidc.security.criterion.StaticCredentialCriterion;
+import net.shibboleth.oidc.security.impl.CredentialConversionUtil;
import net.shibboleth.oidc.security.jose.SignatureSigningParameters;
import net.shibboleth.oidc.security.jose.impl.BasicSignatureSigningParametersResolver;
import net.shibboleth.utilities.java.support.logic.Constraint;
diff --git a/idp-oidc-rp-impl/src/test/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/AuthorizationControllerTest.java b/idp-oidc-rp-impl/src/test/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/AuthorizationControllerTest.java
index 4d623fb..ce6044a 100644
--- a/idp-oidc-rp-impl/src/test/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/AuthorizationControllerTest.java
+++ b/idp-oidc-rp-impl/src/test/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/AuthorizationControllerTest.java
@@ -102,10 +102,10 @@ import net.shibboleth.oidc.profile.config.OIDCAuthorizationConfiguration.OIDCHtt
import net.shibboleth.oidc.profile.core.OIDCAuthenticationRequest;
import net.shibboleth.oidc.profile.decoding.OIDCMessageDecoder;
import net.shibboleth.oidc.profile.encoding.impl.AbstractOIDCMessageEncoder;
-import net.shibboleth.oidc.security.context.JWTSecurityParametersContext;
import net.shibboleth.oidc.security.impl.EncryptJWTHandler;
import net.shibboleth.oidc.security.impl.SignJWTHandler;
import net.shibboleth.oidc.security.jose.SignatureSigningParameters;
+import net.shibboleth.oidc.security.jose.context.SecurityParametersContext;
import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
import net.shibboleth.utilities.java.support.net.HttpServletSupport;
import net.shibboleth.utilities.java.support.net.URLBuilder;
@@ -335,7 +335,7 @@ public class AuthorizationControllerTest extends AbstractTestNGSpringContextTest
*/
private void addSecurityParametersContext(@Nonnull final ProfileRequestContext prc) throws Exception {
// Create a sec context under the nested prc outbound msg context
- final var secContext = prc.getOutboundMessageContext().getSubcontext(JWTSecurityParametersContext.class, true);
+ final var secContext = prc.getOutboundMessageContext().getSubcontext(SecurityParametersContext.class, true);
final var sigParams = new SignatureSigningParameters();
sigParams.setSignatureAlgorithm("HS256");
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list