[java-oidc-common] branch main updated: Rename OIDC authn request encoders
Phil Smart
philip.smart at jisc.ac.uk
Fri Jan 21 09:46:59 UTC 2022
This is an automated email from the git hooks/post-receive script.
philsmart pushed a commit to branch main
in repository java-oidc-common.
View the commit online:
http://git.shibboleth.net/view/?p=java-oidc-common.git;a=commit;h=5ed1a447749302bfa41e36393ee8e0931a63a691
The following commit(s) were added to refs/heads/main by this push:
new 5ed1a44 Rename OIDC authn request encoders
5ed1a44 is described below
commit 5ed1a447749302bfa41e36393ee8e0931a63a691
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Fri Jan 21 09:46:54 2022 +0000
Rename OIDC authn request encoders
---
...coder.java => HTTPPostAuthnRequestEncoder.java} | 4 ++--
...r.java => HTTPRedirectAuthnRequestEncoder.java} | 4 ++--
...t.java => HTTPPostAuthnRequestEncoderTest.java} | 24 ++++++++++++++++++----
...va => HTTPRedirectAuthnRequestEncoderTest.java} | 24 ++++++++++++++++++----
4 files changed, 44 insertions(+), 12 deletions(-)
diff --git a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/encoder/impl/HTTPPostAuthnEncoder.java b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/encoder/impl/HTTPPostAuthnRequestEncoder.java
similarity index 98%
rename from oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/encoder/impl/HTTPPostAuthnEncoder.java
rename to oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/encoder/impl/HTTPPostAuthnRequestEncoder.java
index e7cddfe..409d53f 100644
--- a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/encoder/impl/HTTPPostAuthnEncoder.java
+++ b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/encoder/impl/HTTPPostAuthnRequestEncoder.java
@@ -47,13 +47,13 @@ import net.shibboleth.utilities.java.support.net.HttpServletSupport;
* A {@link MessageEncoder message encoder} that encodes an OpenID authentication request by
* HTTP Form POST Serialization.
*/
-public class HTTPPostAuthnEncoder extends AbstractOIDCMessageEncoder {
+public class HTTPPostAuthnRequestEncoder extends AbstractOIDCMessageEncoder {
/** Default template ID for using FORM POST request type. */
@Nonnull @NotEmpty public static final String DEFAULT_TEMPLATE_ID = "/templates/oidc-request-form-post.vm";
/** Class logger. */
- @Nonnull private final Logger log = LoggerFactory.getLogger(HTTPPostAuthnEncoder.class);
+ @Nonnull private final Logger log = LoggerFactory.getLogger(HTTPPostAuthnRequestEncoder.class);
/** Velocity engine used to evaluate the template when using FORM POST response mode. */
@Nullable private VelocityEngine velocityEngine;
diff --git a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/encoder/impl/HTTPRedirectAuthnEncoder.java b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/encoder/impl/HTTPRedirectAuthnRequestEncoder.java
similarity index 97%
rename from oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/encoder/impl/HTTPRedirectAuthnEncoder.java
rename to oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/encoder/impl/HTTPRedirectAuthnRequestEncoder.java
index 34a53da..c6fb4da 100644
--- a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/encoder/impl/HTTPRedirectAuthnEncoder.java
+++ b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/encoder/impl/HTTPRedirectAuthnRequestEncoder.java
@@ -39,10 +39,10 @@ import net.shibboleth.utilities.java.support.net.URLBuilder;
* Query String Serialization and sends a HTTP redirect response.
*/
//TODO maybe this could encode authz responses as well? to replace the NimbusResponseEncoder
-public class HTTPRedirectAuthnEncoder extends AbstractOIDCMessageEncoder {
+public class HTTPRedirectAuthnRequestEncoder extends AbstractOIDCMessageEncoder {
/** Class logger. */
- @Nonnull private final Logger log = LoggerFactory.getLogger(HTTPRedirectAuthnEncoder.class);
+ @Nonnull private final Logger log = LoggerFactory.getLogger(HTTPRedirectAuthnRequestEncoder.class);
@Override
public boolean test(@Nonnull final OIDCHttpRequestMethod requestMethod) {
diff --git a/oidc-common-profile-impl/src/test/java/net/shibboleth/oidc/profile/encoder/impl/HTTPPostAuthnEncoderTest.java b/oidc-common-profile-impl/src/test/java/net/shibboleth/oidc/profile/encoder/impl/HTTPPostAuthnRequestEncoderTest.java
similarity index 73%
rename from oidc-common-profile-impl/src/test/java/net/shibboleth/oidc/profile/encoder/impl/HTTPPostAuthnEncoderTest.java
rename to oidc-common-profile-impl/src/test/java/net/shibboleth/oidc/profile/encoder/impl/HTTPPostAuthnRequestEncoderTest.java
index 837c609..ade26f4 100644
--- a/oidc-common-profile-impl/src/test/java/net/shibboleth/oidc/profile/encoder/impl/HTTPPostAuthnEncoderTest.java
+++ b/oidc-common-profile-impl/src/test/java/net/shibboleth/oidc/profile/encoder/impl/HTTPPostAuthnRequestEncoderTest.java
@@ -19,15 +19,31 @@ import net.shibboleth.oidc.profile.core.OIDCAuthenticationRequest;
import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
import net.shibboleth.utilities.java.support.component.UninitializedComponentException;
import net.shibboleth.utilities.java.support.velocity.VelocityEngine;
+/*
+ * 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.
+ */
-/** Test for the HTTPPostAuthnEncoder.*/
-public class HTTPPostAuthnEncoderTest {
+/** Test for the HTTPPostAuthnRequestEncoder.*/
+public class HTTPPostAuthnRequestEncoderTest {
/** Mock servlet response.*/
private MockHttpServletResponse mockResponse;
/** The encoder to test.*/
- private HTTPPostAuthnEncoder encoder;
+ private HTTPPostAuthnRequestEncoder encoder;
/** The authentication request.*/
private OIDCAuthenticationRequest request;
@@ -37,7 +53,7 @@ public class HTTPPostAuthnEncoderTest {
@BeforeMethod public void setUp() throws Exception {
- encoder = new HTTPPostAuthnEncoder();
+ encoder = new HTTPPostAuthnRequestEncoder();
context = new MessageContext();
request = new OIDCAuthenticationRequest(new ClientID("clientID"));
// This needs to be dynamic
diff --git a/oidc-common-profile-impl/src/test/java/net/shibboleth/oidc/profile/encoder/impl/HTTPRedirectAuthnEncoderTest.java b/oidc-common-profile-impl/src/test/java/net/shibboleth/oidc/profile/encoder/impl/HTTPRedirectAuthnRequestEncoderTest.java
similarity index 70%
rename from oidc-common-profile-impl/src/test/java/net/shibboleth/oidc/profile/encoder/impl/HTTPRedirectAuthnEncoderTest.java
rename to oidc-common-profile-impl/src/test/java/net/shibboleth/oidc/profile/encoder/impl/HTTPRedirectAuthnRequestEncoderTest.java
index b9a4244..bcbe842 100644
--- a/oidc-common-profile-impl/src/test/java/net/shibboleth/oidc/profile/encoder/impl/HTTPRedirectAuthnEncoderTest.java
+++ b/oidc-common-profile-impl/src/test/java/net/shibboleth/oidc/profile/encoder/impl/HTTPRedirectAuthnRequestEncoderTest.java
@@ -16,12 +16,28 @@ import com.nimbusds.oauth2.sdk.id.ClientID;
import net.shibboleth.oidc.profile.core.OIDCAuthenticationRequest;
import net.shibboleth.utilities.java.support.component.UninitializedComponentException;
+/*
+ * 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.
+ */
-/** Test for the HTTPRedirectAuthnEncoder.*/
-public class HTTPRedirectAuthnEncoderTest {
+/** Test for the HTTPRedirectAuthnRequestEncoder.*/
+public class HTTPRedirectAuthnRequestEncoderTest {
/** The encoder to test.*/
- private HTTPRedirectAuthnEncoder encoder;
+ private HTTPRedirectAuthnRequestEncoder encoder;
/** Mock servlet response.*/
private MockHttpServletResponse mockResponse;
@@ -34,7 +50,7 @@ public class HTTPRedirectAuthnEncoderTest {
@BeforeMethod public void setUp() throws Exception {
- encoder = new HTTPRedirectAuthnEncoder();
+ encoder = new HTTPRedirectAuthnRequestEncoder();
context = new MessageContext();
request = new OIDCAuthenticationRequest(new ClientID("clientID"));
// This needs to be dynamic
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list