geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlmonte...@apache.org
Subject svn commit: r1851799 [1/2] - in /geronimo/specs/trunk: ./ geronimo-security_1.0_spec/ geronimo-security_1.0_spec/src/ geronimo-security_1.0_spec/src/main/ geronimo-security_1.0_spec/src/main/java/ geronimo-security_1.0_spec/src/main/java/javax/ geronim...
Date Tue, 22 Jan 2019 10:07:20 GMT
Author: jlmonteiro
Date: Tue Jan 22 10:07:19 2019
New Revision: 1851799

URL: http://svn.apache.org/viewvc?rev=1851799&view=rev
Log:
Add security 1.0 spec. Thanks Roberto for the patch

Added:
    geronimo/specs/trunk/geronimo-security_1.0_spec/
    geronimo/specs/trunk/geronimo-security_1.0_spec/LICENSE
    geronimo/specs/trunk/geronimo-security_1.0_spec/NOTICE
    geronimo/specs/trunk/geronimo-security_1.0_spec/pom.xml
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/AuthenticationException.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/AuthenticationStatus.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/CallerPrincipal.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/SecurityContext.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/AuthenticationParameters.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/AutoApplySession.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/BasicAuthenticationMechanismDefinition.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/CustomFormAuthenticationMechanismDefinition.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/FormAuthenticationMechanismDefinition.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanism.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanismWrapper.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/HttpMessageContextWrapper.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/LoginToContinue.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/RememberMe.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/AbstractClearableCredential.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/BasicAuthenticationCredential.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/CallerOnlyCredential.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/Credential.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/Password.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/RememberMeCredential.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/UsernamePasswordCredential.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/identitystore/
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/identitystore/CredentialValidationResult.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/identitystore/DatabaseIdentityStoreDefinition.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/identitystore/IdentityStore.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/identitystore/IdentityStoreHandler.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/identitystore/IdentityStorePermission.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/identitystore/IdentityStoreWrapper.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/identitystore/LdapIdentityStoreDefinition.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/identitystore/PasswordHash.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/identitystore/Pbkdf2PasswordHash.java
    geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/identitystore/RememberMeIdentityStore.java
Modified:
    geronimo/specs/trunk/pom.xml

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/LICENSE
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/LICENSE?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/LICENSE (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/LICENSE Tue Jan 22 10:07:19 2019
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/NOTICE
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/NOTICE?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/NOTICE (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/NOTICE Tue Jan 22 10:07:19 2019
@@ -0,0 +1,5 @@
+Apache Geronimo 
+Copyright 2003-2019 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/pom.xml?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/pom.xml (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/pom.xml Tue Jan 22 10:07:19 2019
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.geronimo.genesis</groupId>
+        <artifactId>genesis-java8-flava</artifactId>
+        <version>2.3</version>
+    </parent>
+
+    <groupId>org.apache.geronimo.specs</groupId>
+    <artifactId>geronimo-security_1.0_spec</artifactId>
+    <packaging>bundle</packaging>
+    <name>Apache Geronimo Security Spec 1.0</name>
+    <version>1.0-SNAPSHOT</version>
+
+    <description>Apache Geronimo implementation of the JSR-375</description>
+    <url>http://geronimo.apache.org/maven/${siteId}/${project.version}</url>
+
+    <distributionManagement>
+        <site>
+            <id>apache-website</id>
+            <url>${site.deploy.url}/maven/${siteId}/${project.version}</url>
+        </site>
+    </distributionManagement>
+
+    <properties>
+        <siteId>specs/${project.artifactId}</siteId>
+    </properties>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/geronimo/specs/trunk/geronimo-security_1.0_spec/</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/geronimo/specs/trunk/geronimo-security_1.0_spec/
+        </developerConnection>
+        <url>http://svn.apache.org/viewcvs.cgi/geronimo/specs/trunk/geronimo-security_1.0_spec/</url>
+    </scm>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jaspic_1.0_spec</artifactId>
+            <version>1.1</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-servlet_3.0_spec</artifactId>
+            <version>1.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jcdi_2.0_spec</artifactId>
+            <version>1.1</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-interceptor_1.2_spec</artifactId>
+            <version>1.1</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>3.5.0</version>
+                <configuration>
+                    <instructions>
+                        <Export-Package>javax.security*;version=1.0</Export-Package>
+                        <Provide-Capability><![CDATA[
+                            osgi.contract;osgi.contract=JavaSecurity;uses:="${packages;NAMED;javax.*}";version:List<Version>='1.0'
+                        ]]></Provide-Capability>
+                    </instructions>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.8</source>
+                    <target>1.8</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/AuthenticationException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/AuthenticationException.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/AuthenticationException.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/AuthenticationException.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,39 @@
+/*
+ * 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;
+
+import java.security.GeneralSecurityException;
+
+public class AuthenticationException extends GeneralSecurityException {
+    private static final long serialVersionUID = 1L;
+
+    public AuthenticationException() {
+        super();
+    }
+
+    public AuthenticationException(String message) {
+        super(message);
+    }
+
+    public AuthenticationException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public AuthenticationException(Throwable cause) {
+        super(cause);
+    }
+}

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/AuthenticationStatus.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/AuthenticationStatus.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/AuthenticationStatus.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/AuthenticationStatus.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,24 @@
+/*
+ * 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;
+
+public enum AuthenticationStatus {
+    NOT_DONE,
+    SEND_CONTINUE,
+    SUCCESS,
+    SEND_FAILURE
+}

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/CallerPrincipal.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/CallerPrincipal.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/CallerPrincipal.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/CallerPrincipal.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,35 @@
+/*
+ * 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;
+
+import java.io.Serializable;
+import java.security.Principal;
+
+public class CallerPrincipal implements Principal, Serializable {
+    private static final long serialVersionUID = -6951555039431667786L;
+
+    private final String name;
+
+    public CallerPrincipal(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/SecurityContext.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/SecurityContext.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/SecurityContext.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/SecurityContext.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,36 @@
+/*
+ * 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;
+
+import javax.security.enterprise.authentication.mechanism.http.AuthenticationParameters;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.security.Principal;
+import java.util.Set;
+
+public interface SecurityContext {
+    Principal getCallerPrincipal();
+
+    <T extends Principal> Set<T> getPrincipalsByType(Class<T> pType);
+
+    boolean isCallerInRole(String role);
+
+    boolean hasAccessToWebResource(String resource, String... methods);
+
+    AuthenticationStatus authenticate(HttpServletRequest request, HttpServletResponse response,
+                                      AuthenticationParameters parameters);
+}

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/AuthenticationParameters.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/AuthenticationParameters.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/AuthenticationParameters.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/AuthenticationParameters.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,68 @@
+/*
+ * 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.authentication.mechanism.http;
+
+import javax.security.enterprise.credential.Credential;
+
+public class AuthenticationParameters {
+    private Credential credential;
+    private boolean newAuthentication;
+    private boolean rememberMe;
+
+    public static AuthenticationParameters withParams() {
+        return new AuthenticationParameters();
+    }
+
+    public AuthenticationParameters credential(Credential credential) {
+        setCredential(credential);
+        return this;
+    }
+
+    public AuthenticationParameters newAuthentication(boolean newAuthentication) {
+        setNewAuthentication(newAuthentication);
+        return this;
+    }
+
+    public AuthenticationParameters rememberMe(boolean rememberMe) {
+        setRememberMe(rememberMe);
+        return this;
+    }
+
+    public Credential getCredential() {
+        return credential;
+    }
+
+    public void setCredential(Credential credential) {
+        this.credential = credential;
+    }
+
+    public boolean isNewAuthentication() {
+        return newAuthentication;
+    }
+
+    public void setNewAuthentication(boolean newAuthentication) {
+        this.newAuthentication = newAuthentication;
+    }
+
+    public boolean isRememberMe() {
+        return rememberMe;
+    }
+
+    public void setRememberMe(boolean rememberMe) {
+        this.rememberMe = rememberMe;
+    }
+}

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/AutoApplySession.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/AutoApplySession.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/AutoApplySession.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/AutoApplySession.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,39 @@
+/*
+ * 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.authentication.mechanism.http;
+
+import javax.enterprise.util.AnnotationLiteral;
+import javax.interceptor.InterceptorBinding;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Inherited
+@InterceptorBinding
+@Retention(RUNTIME)
+@Target(TYPE)
+public @interface AutoApplySession {
+    @SuppressWarnings("all")
+    public static final class Literal extends AnnotationLiteral<AutoApplySession> implements AutoApplySession {
+        private static final long serialVersionUID = 1L;
+
+        public static final Literal INSTANCE = new Literal();
+    }
+}

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/BasicAuthenticationMechanismDefinition.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/BasicAuthenticationMechanismDefinition.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/BasicAuthenticationMechanismDefinition.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/BasicAuthenticationMechanismDefinition.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,29 @@
+/*
+ * 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.authentication.mechanism.http;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Retention(RUNTIME)
+@Target(TYPE)
+public @interface BasicAuthenticationMechanismDefinition {
+    String realmName() default "";
+}

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/CustomFormAuthenticationMechanismDefinition.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/CustomFormAuthenticationMechanismDefinition.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/CustomFormAuthenticationMechanismDefinition.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/CustomFormAuthenticationMechanismDefinition.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,31 @@
+/*
+ * 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.authentication.mechanism.http;
+
+import javax.enterprise.util.Nonbinding;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Retention(RUNTIME)
+@Target(TYPE)
+public @interface CustomFormAuthenticationMechanismDefinition {
+    @Nonbinding
+    LoginToContinue loginToContinue();
+}

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/FormAuthenticationMechanismDefinition.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/FormAuthenticationMechanismDefinition.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/FormAuthenticationMechanismDefinition.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/FormAuthenticationMechanismDefinition.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,31 @@
+/*
+ * 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.authentication.mechanism.http;
+
+import javax.enterprise.util.Nonbinding;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Retention(RUNTIME)
+@Target(TYPE)
+public @interface FormAuthenticationMechanismDefinition {
+    @Nonbinding
+    LoginToContinue loginToContinue();
+}

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanism.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanism.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanism.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanism.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,42 @@
+/*
+ * 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.authentication.mechanism.http;
+
+import javax.security.enterprise.AuthenticationException;
+import javax.security.enterprise.AuthenticationStatus;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import static javax.security.enterprise.AuthenticationStatus.SUCCESS;
+
+public interface HttpAuthenticationMechanism {
+
+    AuthenticationStatus validateRequest(HttpServletRequest request, HttpServletResponse response,
+                                         HttpMessageContext httpMessageContext)
+            throws AuthenticationException;
+
+    default AuthenticationStatus secureResponse(HttpServletRequest request, HttpServletResponse response,
+                                                HttpMessageContext httpMessageContext)
+            throws AuthenticationException {
+        return SUCCESS;
+    }
+
+    default void cleanSubject(HttpServletRequest request, HttpServletResponse response,
+                              HttpMessageContext httpMessageContext) {
+        httpMessageContext.cleanClientSubject();
+    }
+}

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanismWrapper.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanismWrapper.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanismWrapper.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanismWrapper.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,57 @@
+/*
+ * 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.authentication.mechanism.http;
+
+import javax.security.enterprise.AuthenticationException;
+import javax.security.enterprise.AuthenticationStatus;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class HttpAuthenticationMechanismWrapper implements HttpAuthenticationMechanism {
+    private final HttpAuthenticationMechanism httpAuthenticationMechanism;
+
+    public HttpAuthenticationMechanismWrapper(final HttpAuthenticationMechanism httpAuthenticationMechanism) {
+        this.httpAuthenticationMechanism = httpAuthenticationMechanism;
+    }
+
+    public HttpAuthenticationMechanism getWrapped() {
+        return httpAuthenticationMechanism;
+    }
+
+    @Override
+    public AuthenticationStatus validateRequest(HttpServletRequest request,
+                                                HttpServletResponse response,
+                                                HttpMessageContext httpMessageContext)
+            throws AuthenticationException {
+        return getWrapped().validateRequest(request, response, httpMessageContext);
+    }
+
+    @Override
+    public AuthenticationStatus secureResponse(HttpServletRequest request,
+                                               HttpServletResponse response,
+                                               HttpMessageContext httpMessageContext)
+            throws AuthenticationException {
+        return getWrapped().secureResponse(request, response, httpMessageContext);
+    }
+
+    @Override
+    public void cleanSubject(HttpServletRequest request,
+                             HttpServletResponse response,
+                             HttpMessageContext httpMessageContext) {
+        getWrapped().cleanSubject(request, response, httpMessageContext);
+    }
+}

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/HttpMessageContext.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,77 @@
+/*
+ * 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.authentication.mechanism.http;
+
+import javax.security.auth.Subject;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.message.MessageInfo;
+import javax.security.enterprise.AuthenticationStatus;
+import javax.security.enterprise.identitystore.CredentialValidationResult;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.security.Principal;
+import java.util.Set;
+
+public interface HttpMessageContext {
+    boolean isProtected();
+
+    boolean isAuthenticationRequest();
+
+    boolean isRegisterSession();
+
+    void setRegisterSession(String callerName, Set<String> groups);
+
+    void cleanClientSubject();
+
+    AuthenticationParameters getAuthParameters();
+
+    CallbackHandler getHandler();
+
+    MessageInfo getMessageInfo();
+
+    Subject getClientSubject();
+
+    HttpServletRequest getRequest();
+
+    void setRequest(HttpServletRequest request);
+
+    HttpMessageContext withRequest(HttpServletRequest request);
+
+    HttpServletResponse getResponse();
+
+    void setResponse(HttpServletResponse response);
+
+    AuthenticationStatus redirect(String location);
+
+    AuthenticationStatus forward(String path);
+
+    AuthenticationStatus responseUnauthorized();
+
+    AuthenticationStatus responseNotFound();
+
+    AuthenticationStatus notifyContainerAboutLogin(String callername, Set<String> groups);
+
+    AuthenticationStatus notifyContainerAboutLogin(Principal principal, Set<String> groups);
+
+    AuthenticationStatus notifyContainerAboutLogin(CredentialValidationResult result);
+
+    AuthenticationStatus doNothing();
+
+    Principal getCallerPrincipal();
+
+    Set<String> getGroups();
+}

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/HttpMessageContextWrapper.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/HttpMessageContextWrapper.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/HttpMessageContextWrapper.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/HttpMessageContextWrapper.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,159 @@
+/*
+ * 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.authentication.mechanism.http;
+
+import javax.security.auth.Subject;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.message.MessageInfo;
+import javax.security.enterprise.AuthenticationStatus;
+import javax.security.enterprise.identitystore.CredentialValidationResult;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.security.Principal;
+import java.util.Set;
+
+public class HttpMessageContextWrapper implements HttpMessageContext {
+    private final HttpMessageContext httpMessageContext;
+
+    public HttpMessageContextWrapper(final HttpMessageContext httpMessageContext) {
+        this.httpMessageContext = httpMessageContext;
+    }
+
+    public HttpMessageContext getWrapped() {
+        return httpMessageContext;
+    }
+
+    @Override
+    public boolean isProtected() {
+        return getWrapped().isProtected();
+    }
+
+    @Override
+    public boolean isAuthenticationRequest() {
+        return getWrapped().isAuthenticationRequest();
+    }
+
+    @Override
+    public boolean isRegisterSession() {
+        return getWrapped().isRegisterSession();
+    }
+
+    @Override
+    public void setRegisterSession(final String callerName, final Set<String> groups) {
+        getWrapped().setRegisterSession(callerName, groups);
+    }
+
+    @Override
+    public void cleanClientSubject() {
+        getWrapped().cleanClientSubject();
+    }
+
+    @Override
+    public AuthenticationParameters getAuthParameters() {
+        return getWrapped().getAuthParameters();
+    }
+
+    @Override
+    public CallbackHandler getHandler() {
+        return getWrapped().getHandler();
+    }
+
+    @Override
+    public MessageInfo getMessageInfo() {
+        return getWrapped().getMessageInfo();
+    }
+
+    @Override
+    public Subject getClientSubject() {
+        return getWrapped().getClientSubject();
+    }
+
+    @Override
+    public HttpServletRequest getRequest() {
+        return getWrapped().getRequest();
+    }
+
+    @Override
+    public void setRequest(final HttpServletRequest request) {
+        getWrapped().setRequest(request);
+    }
+
+    @Override
+    public HttpMessageContext withRequest(final HttpServletRequest request) {
+        return getWrapped().withRequest(request);
+    }
+
+    @Override
+    public HttpServletResponse getResponse() {
+        return getWrapped().getResponse();
+    }
+
+    @Override
+    public void setResponse(final HttpServletResponse response) {
+        getWrapped().setResponse(response);
+    }
+
+    @Override
+    public AuthenticationStatus redirect(final String location) {
+        return getWrapped().redirect(location);
+    }
+
+    @Override
+    public AuthenticationStatus forward(final String path) {
+        return getWrapped().forward(path);
+    }
+
+    @Override
+    public AuthenticationStatus responseUnauthorized() {
+        return getWrapped().responseUnauthorized();
+    }
+
+    @Override
+    public AuthenticationStatus responseNotFound() {
+        return getWrapped().responseNotFound();
+    }
+
+    @Override
+    public AuthenticationStatus notifyContainerAboutLogin(final String callername, final Set<String> groups) {
+        return getWrapped().notifyContainerAboutLogin(callername, groups);
+    }
+
+    @Override
+    public AuthenticationStatus notifyContainerAboutLogin(final Principal principal, final Set<String> groups) {
+        return getWrapped().notifyContainerAboutLogin(principal, groups);
+    }
+
+    @Override
+    public AuthenticationStatus notifyContainerAboutLogin(final CredentialValidationResult result) {
+        return getWrapped().notifyContainerAboutLogin(result);
+    }
+
+    @Override
+    public AuthenticationStatus doNothing() {
+        return getWrapped().doNothing();
+    }
+
+    @Override
+    public Principal getCallerPrincipal() {
+        return getWrapped().getCallerPrincipal();
+    }
+
+    @Override
+    public Set<String> getGroups() {
+        return getWrapped().getGroups();
+    }
+}

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/LoginToContinue.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/LoginToContinue.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/LoginToContinue.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/LoginToContinue.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,124 @@
+/*
+ * 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.authentication.mechanism.http;
+
+import javax.enterprise.util.AnnotationLiteral;
+import javax.enterprise.util.Nonbinding;
+import javax.interceptor.InterceptorBinding;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Inherited
+@InterceptorBinding
+@Retention(RUNTIME)
+@Target(TYPE)
+public @interface LoginToContinue {
+    @Nonbinding
+    String loginPage() default "/login";
+
+    @Nonbinding
+    boolean useForwardToLogin() default true;
+
+    @Nonbinding
+    String useForwardToLoginExpression() default "";
+
+    @Nonbinding
+    String errorPage() default "/login-error";
+
+    @SuppressWarnings("all") final class Literal extends AnnotationLiteral<LoginToContinue> implements LoginToContinue {
+        private static final long serialVersionUID = 1L;
+
+        private final String loginPage;
+        private final boolean useForwardToLogin;
+        private final String useForwardToLoginExpression;
+        private final String errorPage;
+
+        public static LiteralBuilder builder() {
+            return new LiteralBuilder();
+        }
+
+        public static class LiteralBuilder {
+            private String loginPage = "/login";
+            private boolean useForwardToLogin = true;
+            private String useForwardToLoginExpression;
+            private String errorPage = "/login-error";
+
+            public LiteralBuilder loginPage(String loginPage) {
+                this.loginPage = loginPage;
+                return this;
+            }
+
+            public LiteralBuilder useForwardToLogin(boolean useForwardToLogin) {
+                this.useForwardToLogin = useForwardToLogin;
+                return this;
+            }
+
+            public LiteralBuilder useForwardToLoginExpression(String useForwardToLoginExpression) {
+                this.useForwardToLoginExpression = useForwardToLoginExpression;
+                return this;
+            }
+
+            public LiteralBuilder errorPage(String errorPage) {
+                this.errorPage = errorPage;
+                return this;
+            }
+
+            public Literal build() {
+                return new Literal(
+                        loginPage,
+                        useForwardToLogin,
+                        useForwardToLoginExpression,
+                        errorPage);
+            }
+        }
+
+        public Literal(String loginPage,
+                       boolean useForwardToLogin,
+                       String useForwardToLoginExpression,
+                       String errorPage) {
+            this.loginPage = loginPage;
+            this.useForwardToLogin = useForwardToLogin;
+            this.useForwardToLoginExpression = useForwardToLoginExpression;
+            this.errorPage = errorPage;
+        }
+
+        @Override
+        public String loginPage() {
+            return loginPage;
+        }
+
+        @Override
+        public boolean useForwardToLogin() {
+            return useForwardToLogin;
+        }
+
+        @Override
+        public String useForwardToLoginExpression() {
+            return useForwardToLoginExpression;
+        }
+
+        @Override
+        public String errorPage() {
+            return errorPage;
+        }
+
+    }
+}

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/RememberMe.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/RememberMe.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/RememberMe.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/authentication/mechanism/http/RememberMe.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,216 @@
+/*
+ * 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.authentication.mechanism.http;
+
+import javax.enterprise.util.AnnotationLiteral;
+import javax.enterprise.util.Nonbinding;
+import javax.interceptor.InterceptorBinding;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Inherited
+@InterceptorBinding
+@Retention(RUNTIME)
+@Target(TYPE)
+public @interface RememberMe {
+    @Nonbinding
+    int cookieMaxAgeSeconds() default 86400;
+
+    @Nonbinding
+    String cookieMaxAgeSecondsExpression() default "";
+
+    @Nonbinding
+    boolean cookieSecureOnly() default true;
+
+    @Nonbinding
+    String cookieSecureOnlyExpression() default "";
+
+    @Nonbinding
+    boolean cookieHttpOnly() default true;
+
+    @Nonbinding
+    String cookieHttpOnlyExpression() default "";
+
+    @Nonbinding
+    String cookieName() default "JREMEMBERMEID";
+
+    @Nonbinding
+    boolean isRememberMe() default true;
+
+    @Nonbinding
+    String isRememberMeExpression() default "";
+
+    @SuppressWarnings("all")
+    final class Literal extends AnnotationLiteral<RememberMe> implements RememberMe {
+        private static final long serialVersionUID = 1L;
+
+        private final int cookieMaxAgeSeconds;
+        private final String cookieMaxAgeSecondsExpression;
+        private final boolean cookieSecureOnly;
+        private final String cookieSecureOnlyExpression;
+        private final boolean cookieHttpOnly;
+        private final String cookieHttpOnlyExpression;
+        private final String cookieName;
+        private final boolean isRememberMe;
+        private final String isRememberMeExpression;
+
+        public static LiteralBuilder builder() {
+            return new LiteralBuilder();
+        }
+
+        public static class LiteralBuilder {
+            private int cookieMaxAgeSeconds = 86400;
+            private String cookieMaxAgeSecondsExpression;
+            private boolean cookieSecureOnly = true;
+            private String cookieSecureOnlyExpression;
+            private boolean cookieHttpOnly = true;
+            private String cookieHttpOnlyExpression;
+            private String cookieName = "JREMEMBERMEID";
+            private boolean isRememberMe = true;
+            private String isRememberMeExpression;
+
+            public LiteralBuilder cookieMaxAgeSeconds(int cookieMaxAgeSeconds) {
+                this.cookieMaxAgeSeconds = cookieMaxAgeSeconds;
+                return this;
+            }
+
+            public LiteralBuilder cookieMaxAgeSecondsExpression(String cookieMaxAgeSecondsExpression) {
+                this.cookieMaxAgeSecondsExpression = cookieMaxAgeSecondsExpression;
+                return this;
+            }
+
+            public LiteralBuilder cookieSecureOnly(boolean cookieSecureOnly) {
+                this.cookieSecureOnly = cookieSecureOnly;
+                return this;
+
+            }
+
+            public LiteralBuilder cookieSecureOnlyExpression(String cookieSecureOnlyExpression) {
+                this.cookieSecureOnlyExpression = cookieSecureOnlyExpression;
+                return this;
+            }
+
+            public LiteralBuilder cookieHttpOnly(boolean cookieHttpOnly) {
+                this.cookieHttpOnly = cookieHttpOnly;
+                return this;
+            }
+
+            public LiteralBuilder cookieHttpOnlyExpression(String cookieHttpOnlyExpression) {
+                this.cookieHttpOnlyExpression = cookieHttpOnlyExpression;
+                return this;
+            }
+
+            public LiteralBuilder cookieName(String cookieName) {
+                this.cookieName = cookieName;
+                return this;
+            }
+
+            public LiteralBuilder isRememberMe(boolean isRememberMe) {
+                this.isRememberMe = isRememberMe;
+                return this;
+            }
+
+            public LiteralBuilder isRememberMeExpression(String isRememberMeExpression) {
+                this.isRememberMeExpression = isRememberMeExpression;
+                return this;
+            }
+
+            public Literal build() {
+                return new Literal(
+                        cookieMaxAgeSeconds,
+                        cookieMaxAgeSecondsExpression,
+                        cookieSecureOnly,
+                        cookieSecureOnlyExpression,
+                        cookieHttpOnly,
+                        cookieHttpOnlyExpression,
+                        cookieName,
+                        isRememberMe,
+                        isRememberMeExpression);
+            }
+        }
+
+        public Literal(int cookieMaxAgeSeconds,
+                       String cookieMaxAgeSecondsExpression,
+                       boolean cookieSecureOnly,
+                       String cookieSecureOnlyExpression,
+                       boolean cookieHttpOnly,
+                       String cookieHttpOnlyExpression,
+                       String cookieName,
+                       boolean isRememberMe,
+                       String isRememberMeExpression) {
+
+            this.cookieMaxAgeSeconds = cookieMaxAgeSeconds;
+            this.cookieMaxAgeSecondsExpression = cookieMaxAgeSecondsExpression;
+            this.cookieSecureOnly = cookieSecureOnly;
+            this.cookieSecureOnlyExpression = cookieSecureOnlyExpression;
+            this.cookieHttpOnly = cookieHttpOnly;
+            this.cookieHttpOnlyExpression = cookieHttpOnlyExpression;
+            this.cookieName = cookieName;
+            this.isRememberMe = isRememberMe;
+            this.isRememberMeExpression = isRememberMeExpression;
+        }
+
+        @Override
+        public boolean cookieHttpOnly() {
+            return cookieHttpOnly;
+        }
+
+        @Override
+        public String cookieHttpOnlyExpression() {
+            return cookieHttpOnlyExpression;
+        }
+
+        @Override
+        public int cookieMaxAgeSeconds() {
+            return cookieMaxAgeSeconds;
+        }
+
+        @Override
+        public String cookieMaxAgeSecondsExpression() {
+            return cookieMaxAgeSecondsExpression;
+        }
+
+        @Override
+        public boolean cookieSecureOnly() {
+            return cookieSecureOnly;
+        }
+
+        @Override
+        public String cookieSecureOnlyExpression() {
+            return cookieSecureOnlyExpression;
+        }
+
+        @Override
+        public String cookieName() {
+            return cookieName;
+        }
+
+        @Override
+        public boolean isRememberMe() {
+            return isRememberMe;
+        }
+
+        @Override
+        public String isRememberMeExpression() {
+            return isRememberMeExpression;
+        }
+    }
+}

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/AbstractClearableCredential.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/AbstractClearableCredential.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/AbstractClearableCredential.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/AbstractClearableCredential.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,39 @@
+/*
+ * 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.credential;
+
+public abstract class AbstractClearableCredential implements Credential {
+
+    private volatile boolean cleared = false;
+
+    @Override
+    public final boolean isCleared() {
+        return cleared;
+    }
+
+    protected final void setCleared() {
+        this.cleared = true;
+    }
+
+    @Override
+    public final void clear() {
+        clearCredential();
+        setCleared();
+    }
+
+    protected abstract void clearCredential();
+}

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/BasicAuthenticationCredential.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/BasicAuthenticationCredential.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/BasicAuthenticationCredential.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/BasicAuthenticationCredential.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,67 @@
+/*
+ * 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.credential;
+
+import java.io.UnsupportedEncodingException;
+import java.util.Base64;
+
+public class BasicAuthenticationCredential extends UsernamePasswordCredential {
+
+    public BasicAuthenticationCredential(String authorizationHeader) {
+        super(parseUsername(authorizationHeader), parsePassword(authorizationHeader));
+    }
+
+    private static String decodeHeader(String authorizationHeader) {
+        final String basicAuthCharset = "US-ASCII";
+
+        if (null == authorizationHeader) {
+            throw new NullPointerException("authorization header");
+        }
+
+        if (authorizationHeader.isEmpty()) {
+            throw new IllegalArgumentException("authorization header is empty");
+        }
+
+        final Base64.Decoder decoder = Base64.getMimeDecoder();
+        byte[] decodedBytes = decoder.decode(authorizationHeader);
+        try {
+            return new String(decodedBytes, basicAuthCharset);
+        } catch (UnsupportedEncodingException e) {
+            throw new IllegalStateException("Unknown Charset: " + basicAuthCharset, e);
+        }
+    }
+
+    private static String parseUsername(String authorizationHeader) {
+        String decodedAuthorizationHeader = decodeHeader(authorizationHeader);
+        int delimiterIndex = decodedAuthorizationHeader.indexOf(':');
+        if (delimiterIndex > -1) {
+            return decodedAuthorizationHeader.substring(0, delimiterIndex);
+        } else {
+            return decodedAuthorizationHeader;
+        }
+    }
+
+    private static Password parsePassword(String authorizationHeader) {
+        String decodedAuthorizationHeader = decodeHeader(authorizationHeader);
+        int delimiterIndex = decodedAuthorizationHeader.indexOf(':');
+        if (delimiterIndex > -1) {
+            return new Password(decodedAuthorizationHeader.substring(delimiterIndex + 1));
+        } else {
+            return new Password("");
+        }
+    }
+}

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/CallerOnlyCredential.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/CallerOnlyCredential.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/CallerOnlyCredential.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/CallerOnlyCredential.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,29 @@
+/*
+ * 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.credential;
+
+public class CallerOnlyCredential implements Credential {
+    private final String caller;
+
+    public CallerOnlyCredential(String caller) {
+        this.caller = caller;
+    }
+
+    public String getCaller() {
+        return caller;
+    }
+}

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/Credential.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/Credential.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/Credential.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/Credential.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,29 @@
+/*
+ * 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.credential;
+
+public interface Credential {
+    default boolean isCleared() {
+        return false;
+    }
+
+    default void clear() {}
+    
+    default boolean isValid() {
+        return true;
+    }
+}

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/Password.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/Password.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/Password.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/Password.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,56 @@
+/*
+ * 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.credential;
+
+import java.util.Arrays;
+
+import static java.util.Arrays.copyOf;
+import static java.util.Objects.requireNonNull;
+
+public class Password {
+    private static final char[] EMPTY_VALUE = new char[0];
+    private volatile char[] value;
+
+    public Password(char[] value) {
+        requireNonNull(value, "Password value may not be null");
+
+        this.value = copyOf(value, value.length);
+    }
+
+    public Password(String value) {
+        this(null == value ? null : value.toCharArray());
+    }
+
+    public char[] getValue() {
+        return value;
+    }
+
+    public void clear() {
+        if (EMPTY_VALUE == value) { return; }
+
+        char[] tempValue = value;
+        value = EMPTY_VALUE;
+
+        for (int i = 0; i < tempValue.length; i++) {
+            tempValue[i] = 0x00;
+        }
+    }
+    
+    public boolean compareTo(String password) {
+        return password != null && Arrays.equals(password.toCharArray(), value);
+    }
+}

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/RememberMeCredential.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/RememberMeCredential.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/RememberMeCredential.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/RememberMeCredential.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,29 @@
+/*
+ * 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.credential;
+
+public class RememberMeCredential implements Credential {
+    private final String token;
+
+    public RememberMeCredential(String token) {
+        this.token = token;
+    }
+
+    public String getToken() {
+        return token;
+    }
+}

Added: geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/UsernamePasswordCredential.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/UsernamePasswordCredential.java?rev=1851799&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/UsernamePasswordCredential.java (added)
+++ geronimo/specs/trunk/geronimo-security_1.0_spec/src/main/java/javax/security/enterprise/credential/UsernamePasswordCredential.java Tue Jan 22 10:07:19 2019
@@ -0,0 +1,54 @@
+/*
+ * 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.credential;
+
+public class UsernamePasswordCredential extends AbstractClearableCredential {
+
+    private final String caller;
+    private final Password password;
+
+    public UsernamePasswordCredential(String callerName, String password) {
+        this.caller = callerName;
+        this.password = new Password(password);
+    }
+
+    public UsernamePasswordCredential(String callerName, Password password) {
+        this.caller = callerName;
+        this.password = password;
+    }
+
+    public Password getPassword() {
+        return password;
+    }
+
+    public String getPasswordAsString() {
+        return String.valueOf(getPassword().getValue());
+    }
+
+    @Override
+    public void clearCredential() {
+        password.clear();
+    }
+
+    public String getCaller() {
+        return caller;
+    }
+
+    public boolean compareTo(String callerName, String password) {
+        return getCaller().equals(callerName) && getPassword().compareTo(password);
+    }
+}



Mime
View raw message