[java-shib-profile] branch main updated: JSPROF-1 - Move RelyingParty "layer" into java-shib-profile
Scott Cantor
cantor.2 at osu.edu
Wed Feb 15 16:28:48 UTC 2023
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-shib-profile.
View the commit online:
http://git.shibboleth.net/view/?p=java-shib-profile.git;a=commit;h=680bf860e2d00c1d1d2d35b9b4b174cec1586c40
The following commit(s) were added to refs/heads/main by this push:
new 680bf86 JSPROF-1 - Move RelyingParty "layer" into java-shib-profile
680bf86 is described below
commit 680bf860e2d00c1d1d2d35b9b4b174cec1586c40
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Feb 15 11:28:45 2023 -0500
JSPROF-1 - Move RelyingParty "layer" into java-shib-profile
https://shibboleth.atlassian.net/browse/JSPROF-1
Move AuditContext.
---
.../shibboleth/profile/context/AuditContext.java | 66 ++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/shib-profile-api/src/main/java/net/shibboleth/profile/context/AuditContext.java b/shib-profile-api/src/main/java/net/shibboleth/profile/context/AuditContext.java
new file mode 100644
index 0000000..0643add
--- /dev/null
+++ b/shib-profile-api/src/main/java/net/shibboleth/profile/context/AuditContext.java
@@ -0,0 +1,66 @@
+/*
+ * 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.profile.context;
+
+import java.util.Collection;
+
+import javax.annotation.Nonnull;
+
+import org.opensaml.messaging.context.BaseContext;
+
+import com.google.common.collect.HashMultimap;
+import com.google.common.collect.Multimap;
+
+import net.shibboleth.shared.annotation.constraint.Live;
+import net.shibboleth.shared.annotation.constraint.NonnullElements;
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
+/**
+ * {@link BaseContext} containing information to preserve for auditing/logging.
+ */
+public final class AuditContext extends BaseContext {
+
+ /** Extensible map of arbitrary field to data mappings. */
+ @Nonnull @NonnullElements private Multimap<String,String> fieldMap;
+
+ /** Constructor. */
+ public AuditContext() {
+ fieldMap = HashMultimap.create(20, 1);
+ }
+
+ /**
+ * Get a live view of the map of field/data mappings.
+ *
+ * @return field/data mappings
+ */
+ @Nonnull @NonnullElements @Live public Multimap<String,String> getFields() {
+ return fieldMap;
+ }
+
+ /**
+ * Get a live collection of values associated with a field.
+ *
+ * @param field field to retrieve
+ *
+ * @return the field's values
+ */
+ @Nonnull @NonnullElements @Live public Collection<String> getFieldValues(@Nonnull @NotEmpty final String field) {
+ return fieldMap.get(field);
+ }
+
+}
\ 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