[java-idp-plugin-oidc-rp] branch main updated: Fix accidental class move to test package
Phil Smart
philip.smart at jisc.ac.uk
Tue Apr 25 11:13:36 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=1aedf8d98193d0f9d30a330b2450159eab8786bc
The following commit(s) were added to refs/heads/main by this push:
new 1aedf8d Fix accidental class move to test package
1aedf8d is described below
commit 1aedf8d98193d0f9d30a330b2450159eab8786bc
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Tue Apr 25 12:13:34 2023 +0100
Fix accidental class move to test package
---
.../navigate/DefaultIssuerIDLookupFunction.java | 47 ++++++++++++++++++++++
.../impl/DefaultRedirectUriCreationFunction.java | 1 -
.../oidc/rp/impl/ExchangeCodeForAccessToken.java | 2 +-
.../rp/impl/InitializeAuthorizationRequest.java | 2 +-
.../rp/impl/InitializeOAuth2ClientContext.java | 1 +
.../rp/impl/InitializeRelyingPartyContext.java | 4 --
.../authn/oidc/rp/conf/authn/oidc-rp.properties | 6 +--
7 files changed, 53 insertions(+), 10 deletions(-)
diff --git a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/navigate/DefaultIssuerIDLookupFunction.java b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/navigate/DefaultIssuerIDLookupFunction.java
new file mode 100644
index 0000000..2c9ae1e
--- /dev/null
+++ b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/navigate/DefaultIssuerIDLookupFunction.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements. See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID licenses this file to You under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.idp.plugin.authn.oidc.rp.context.navigate;
+
+import javax.annotation.Nullable;
+import javax.annotation.concurrent.ThreadSafe;
+
+import org.opensaml.messaging.context.MessageContext;
+import org.opensaml.messaging.context.navigate.ContextDataLookupFunction;
+
+import net.shibboleth.idp.plugin.authn.oidc.rp.context.OIDCPeerEntityContext;
+
+/**
+ * Strategy to pull out the ID of the OIDC proxy issuer/provider from the {@link OIDCPeerEntityContext}.
+ */
+ at ThreadSafe
+public class DefaultIssuerIDLookupFunction implements ContextDataLookupFunction<MessageContext, String> {
+
+ /** {@inheritDoc} */
+ @Override
+ @Nullable public String apply(@Nullable final MessageContext input) {
+ if (input == null) {
+ return null;
+ }
+
+ final OIDCPeerEntityContext context = input.getSubcontext(OIDCPeerEntityContext.class);
+ if (context == null) {
+ return null;
+ }
+ return context.getIdentifier();
+ }
+}
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/DefaultRedirectUriCreationFunction.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/DefaultRedirectUriCreationFunction.java
index 15cb1bc..bee4013 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/DefaultRedirectUriCreationFunction.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/DefaultRedirectUriCreationFunction.java
@@ -60,7 +60,6 @@ import net.shibboleth.utilities.java.support.primitive.StringSupport;
* <p>Is thread-safe and immutable</p>
*/
@ThreadSafeAfterInit
-//TODO similar to that used in the Duo plugin.
public class DefaultRedirectUriCreationFunction extends AbstractIdentifiableInitializableComponent
implements BiFunction<HttpServletRequest, ProfileRequestContext, URI> {
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ExchangeCodeForAccessToken.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ExchangeCodeForAccessToken.java
index a18dd80..47fe148 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ExchangeCodeForAccessToken.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ExchangeCodeForAccessToken.java
@@ -42,7 +42,7 @@ import net.shibboleth.utilities.java.support.logic.Constraint;
/**
* Action to exchange the authorization code in the authentication response for an OAuth access token which
- * contains an OIDC id_token. Once obtained, adds the token to the {@link AccessTokenResponseContext}. *
+ * contains an OIDC id_token. Once obtained, adds the token to the {@link AccessTokenResponseContext}.
*
* @event {@link org.opensaml.profile.action.EventIds#PROCEED_EVENT_ID}
* @event {@link EventIds#INVALID_PROFILE_CTX}
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeAuthorizationRequest.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeAuthorizationRequest.java
index 382d206..10e355f 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeAuthorizationRequest.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeAuthorizationRequest.java
@@ -40,7 +40,7 @@ import net.shibboleth.utilities.java.support.component.ComponentSupport;
import net.shibboleth.utilities.java.support.logic.Constraint;
/**
- * And action that creates an {@link OIDCAuthenticationRequest} shell to populate in future steps,
+ * An action that creates an {@link OIDCAuthenticationRequest} shell to populate in future steps,
* and sets it to the outbound message context.
*
* @event {@link org.opensaml.profile.action.EventIds#PROCEED_EVENT_ID}
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeOAuth2ClientContext.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeOAuth2ClientContext.java
index 2c8b36e..a609af0 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeOAuth2ClientContext.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeOAuth2ClientContext.java
@@ -52,6 +52,7 @@ import net.shibboleth.utilities.java.support.primitive.StringSupport;
* @event {@link EventIds#INVALID_PROFILE_CTX}
* @post Add the clientId and redirect URI to the {@link OAuth2ClientContext}
*/
+// TODO this mostly pulls in things from the profile config and stores them, it could just come from the profile later
public class InitializeOAuth2ClientContext extends AbstractProfileAction {
/** Class logger. */
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeRelyingPartyContext.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeRelyingPartyContext.java
index 6b835d1..08652c7 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeRelyingPartyContext.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeRelyingPartyContext.java
@@ -49,7 +49,6 @@ import net.shibboleth.utilities.java.support.logic.Constraint;
* @event {@link IdPEventIds#INVALID_RELYING_PARTY_CTX}
* @post ProfileRequestContext.getSubcontext(RelyingPartyContext.class) != null with relying party id set.
*/
-// TODO: this is pretty much identical to that in the OP, should that be moved into commons?
public class InitializeRelyingPartyContext extends AbstractProfileAction {
/** Class logger. */
@@ -68,9 +67,6 @@ public class InitializeRelyingPartyContext extends AbstractProfileAction {
/** Strategy used to look up the {@link SAMLPeerEntityContext} to draw from. */
@Nonnull private Function<ProfileRequestContext,OIDCPeerEntityContext> peerEntityContextLookupStrategy;
- /** OIDC issuer id of the upstream OP. */
- @Nullable private String issuerId;
-
/** Constructor. */
public InitializeRelyingPartyContext() {
relyingPartyContextCreationStrategy = new ChildContextLookup<>(RelyingPartyContext.class, true);
diff --git a/idp-oidc-rp-impl/src/main/resources/net/shibboleth/idp/plugin/authn/oidc/rp/conf/authn/oidc-rp.properties b/idp-oidc-rp-impl/src/main/resources/net/shibboleth/idp/plugin/authn/oidc/rp/conf/authn/oidc-rp.properties
index 2db786d..0fbede1 100644
--- a/idp-oidc-rp-impl/src/main/resources/net/shibboleth/idp/plugin/authn/oidc/rp/conf/authn/oidc-rp.properties
+++ b/idp-oidc-rp-impl/src/main/resources/net/shibboleth/idp/plugin/authn/oidc/rp/conf/authn/oidc-rp.properties
@@ -8,9 +8,9 @@ idp.authn.oidc.rp.client.redirecturl.allowedOrigins = https://localhost:8443
#idp.authn.oidc.rp.provider.discoveryRequired=false
#idp.authn.discoveryURL=http://opdisco.com
-#idp.authn.oidc.rp.client.requestobject.supported= false
-#idp.authn.oidc.rp.client.requestobject.encrypted = false
-#idp.authn.oidc.rp.client.requestobject.signed = true
+#idp.oidc.requestobject.used= false
+#idp.oidc.requestobject.encrypted = false
+#idp.oidc.requestobject.signed = true
## If true and the token was retrieved using TLS with server validation, JWS signature checking will be skipped.
#idp.authn.oidc.rp.client.idtoken.tlsServerValidationOnly = false
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list