This is an automated email from the ASF dual-hosted git repository.

radcortez pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git

commit 7aa11b3e5f2536a99cfa43a3fe2699509088fe73
Author: Roberto Cortez <[email protected]>
AuthorDate: Tue Dec 18 16:02:10 2018 +0000

    TOMEE-2365 - Added IdentityStore API.
---
 .../enterprise/identitystore/IdentityStore.java    | 33 ++++++++++++++++++++++
 .../identitystore/IdentityStoreHandler.java        | 23 +++++++++++++++
 2 files changed, 56 insertions(+)

diff --git 
a/tomee/tomee-security/src/main/java/javax/security/enterprise/identitystore/IdentityStore.java
 
b/tomee/tomee-security/src/main/java/javax/security/enterprise/identitystore/IdentityStore.java
new file mode 100644
index 0000000..badb400
--- /dev/null
+++ 
b/tomee/tomee-security/src/main/java/javax/security/enterprise/identitystore/IdentityStore.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF 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 javax.security.enterprise.identitystore;
+
+import javax.security.enterprise.credential.Credential;
+import java.util.Set;
+
+public interface IdentityStore {
+
+    enum ValidationType { VALIDATE, PROVIDE_GROUPS }
+
+    CredentialValidationResult validate(Credential credential);
+
+    Set<String> getCallerGroups(CredentialValidationResult validationResult);
+
+    int priority();
+
+    Set<ValidationType> validationTypes();
+}
diff --git 
a/tomee/tomee-security/src/main/java/javax/security/enterprise/identitystore/IdentityStoreHandler.java
 
b/tomee/tomee-security/src/main/java/javax/security/enterprise/identitystore/IdentityStoreHandler.java
new file mode 100644
index 0000000..4ce3049
--- /dev/null
+++ 
b/tomee/tomee-security/src/main/java/javax/security/enterprise/identitystore/IdentityStoreHandler.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF 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 javax.security.enterprise.identitystore;
+
+import javax.security.enterprise.credential.Credential;
+
+public interface IdentityStoreHandler {
+    CredentialValidationResult validate(Credential credential);
+}

Reply via email to