[java-oidc-common] branch main updated: JCOMOIDC-38 - Move various support classes from the OP plugin

Phil Smart philip.smart at jisc.ac.uk
Fri Mar 18 09:49:05 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=3adb386abeb1661ece704590e4ceafcc4bdfcf9a

The following commit(s) were added to refs/heads/main by this push:
     new 3adb386  JCOMOIDC-38 - Move various support classes from the OP plugin
3adb386 is described below

commit 3adb386abeb1661ece704590e4ceafcc4bdfcf9a
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Fri Mar 18 09:48:59 2022 +0000

    JCOMOIDC-38 - Move various support classes from the OP plugin
    
     - Moved OAuth2ClientAuthenticationContext into commons from OP plugin
    
    https://shibboleth.atlassian.net/browse/JCOMOIDC-38
---
 .../context/OAuth2ClientAuthenticationContext.java | 59 ++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/oidc-common-crypto-api/src/main/java/net/shibboleth/oidc/authn/context/OAuth2ClientAuthenticationContext.java b/oidc-common-crypto-api/src/main/java/net/shibboleth/oidc/authn/context/OAuth2ClientAuthenticationContext.java
new file mode 100644
index 0000000..7699f78
--- /dev/null
+++ b/oidc-common-crypto-api/src/main/java/net/shibboleth/oidc/authn/context/OAuth2ClientAuthenticationContext.java
@@ -0,0 +1,59 @@
+/*
+ * 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.oidc.authn.context;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import org.opensaml.messaging.context.BaseContext;
+
+import com.nimbusds.oauth2.sdk.auth.ClientAuthentication;
+
+/**
+ * A context containing data about OAuth 2.0 client authentication.
+ * 
+ * <p>Currently implemented using Nimbus APIs.</p> 
+ */
+public final class OAuth2ClientAuthenticationContext extends BaseContext {
+    
+    /** Client authentication abstraction. */
+    @Nullable private ClientAuthentication clientAuthentication;
+    
+    /**
+     * Get the OAuth 2 client authentication credentials.
+     * 
+     * @return client authentication credentials
+     */
+    @Nullable public ClientAuthentication getClientAuthentication() {
+        return clientAuthentication;
+    }
+
+    /**
+     * Set the OAuth 2 client authentication credentials.
+     * 
+     * @param creds client authentication credentials
+     * 
+     * @return this context
+     */
+    @Nonnull public OAuth2ClientAuthenticationContext setClientAuthentication(
+            @Nullable final ClientAuthentication creds) {
+        clientAuthentication = creds;
+        return this;
+    }
+
+}
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list