You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by bd...@apache.org on 2016/11/07 22:31:43 UTC

[1/8] shiro git commit: Adding back in removed UnailableSecurityManagerException constructor

Repository: shiro
Updated Branches:
  refs/heads/master e3516697b -> e8ba5cbef


Adding back in removed UnailableSecurityManagerException constructor

Moving master back to 1.4, per semver, we need to add this constructor back in


Project: http://git-wip-us.apache.org/repos/asf/shiro/repo
Commit: http://git-wip-us.apache.org/repos/asf/shiro/commit/6eb070f4
Tree: http://git-wip-us.apache.org/repos/asf/shiro/tree/6eb070f4
Diff: http://git-wip-us.apache.org/repos/asf/shiro/diff/6eb070f4

Branch: refs/heads/master
Commit: 6eb070f4ac6a882eb01ce188701b40d0017ae2d0
Parents: e351669
Author: Brian Demers <bd...@apache.org>
Authored: Mon Nov 7 12:20:57 2016 -0500
Committer: Brian Demers <bd...@apache.org>
Committed: Mon Nov 7 15:06:23 2016 -0500

----------------------------------------------------------------------
 .../apache/shiro/UnavailableSecurityManagerException.java    | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/shiro/blob/6eb070f4/core/src/main/java/org/apache/shiro/UnavailableSecurityManagerException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/shiro/UnavailableSecurityManagerException.java b/core/src/main/java/org/apache/shiro/UnavailableSecurityManagerException.java
index af1b021..9f07670 100644
--- a/core/src/main/java/org/apache/shiro/UnavailableSecurityManagerException.java
+++ b/core/src/main/java/org/apache/shiro/UnavailableSecurityManagerException.java
@@ -29,4 +29,12 @@ public class UnavailableSecurityManagerException extends ShiroException {
     public UnavailableSecurityManagerException(String message) {
         super(message);
     }
+
+    /**
+     * @deprecated This constructor is NOT used by Shiro directly, and will be removed in the future.
+     */
+    @Deprecated
+    public UnavailableSecurityManagerException(String message, Throwable cause) {
+        super(message, cause);
+    }
 }


[8/8] shiro git commit: added newer modules to test-coverage pom

Posted by bd...@apache.org.
added newer modules to test-coverage pom


Project: http://git-wip-us.apache.org/repos/asf/shiro/repo
Commit: http://git-wip-us.apache.org/repos/asf/shiro/commit/e8ba5cbe
Tree: http://git-wip-us.apache.org/repos/asf/shiro/tree/e8ba5cbe
Diff: http://git-wip-us.apache.org/repos/asf/shiro/diff/e8ba5cbe

Branch: refs/heads/master
Commit: e8ba5cbef95a65f144edc336858c9db8efc1e557
Parents: 42e3b51
Author: Brian Demers <bd...@apache.org>
Authored: Mon Nov 7 16:50:33 2016 -0500
Committer: Brian Demers <bd...@apache.org>
Committed: Mon Nov 7 16:50:33 2016 -0500

----------------------------------------------------------------------
 test-coverage/pom.xml | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/shiro/blob/e8ba5cbe/test-coverage/pom.xml
----------------------------------------------------------------------
diff --git a/test-coverage/pom.xml b/test-coverage/pom.xml
index f088f32..93fcc96 100644
--- a/test-coverage/pom.xml
+++ b/test-coverage/pom.xml
@@ -34,10 +34,34 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-lang</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
             <artifactId>shiro-core</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-config-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-config-ogdl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-crypto-cipher</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-crypto-hash</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-crypto-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
             <artifactId>shiro-web</artifactId>
         </dependency>
         <dependency>
@@ -48,18 +72,29 @@
             <groupId>org.apache.shiro</groupId>
             <artifactId>shiro-cas</artifactId>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-cache</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.apache.shiro</groupId>
             <artifactId>shiro-ehcache</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-hazelcast</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
             <artifactId>shiro-guice</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.shiro</groupId>
             <artifactId>shiro-quartz</artifactId>
         </dependency>
+
         <dependency>
             <groupId>org.apache.shiro</groupId>
             <artifactId>shiro-spring</artifactId>


[4/8] shiro git commit: Adding shiro-cas back to master

Posted by bd...@apache.org.
Adding shiro-cas back to master

Still deprecated, but we cannot remove it until 2.0


Project: http://git-wip-us.apache.org/repos/asf/shiro/repo
Commit: http://git-wip-us.apache.org/repos/asf/shiro/commit/056d7cc2
Tree: http://git-wip-us.apache.org/repos/asf/shiro/tree/056d7cc2
Diff: http://git-wip-us.apache.org/repos/asf/shiro/diff/056d7cc2

Branch: refs/heads/master
Commit: 056d7cc27b462d94f8dc91490154dbca784d857c
Parents: 3fccc75
Author: Brian Demers <bd...@apache.org>
Authored: Mon Nov 7 15:16:10 2016 -0500
Committer: Brian Demers <bd...@apache.org>
Committed: Mon Nov 7 15:16:10 2016 -0500

----------------------------------------------------------------------
 support/cas/pom.xml                             |  89 ++++++
 .../shiro/cas/CasAuthenticationException.java   |  46 +++
 .../java/org/apache/shiro/cas/CasFilter.java    | 156 +++++++++
 .../java/org/apache/shiro/cas/CasRealm.java     | 313 +++++++++++++++++++
 .../org/apache/shiro/cas/CasSubjectFactory.java |  59 ++++
 .../java/org/apache/shiro/cas/CasToken.java     |  67 ++++
 .../org/apache/shiro/cas/CasRealmTest.groovy    | 176 +++++++++++
 .../org/apache/shiro/cas/CasTokenTest.groovy    |  49 +++
 .../shiro/cas/MockServiceTicketValidator.groovy |  60 ++++
 support/pom.xml                                 |   1 +
 test-coverage/pom.xml                           |   4 +
 11 files changed, 1020 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/shiro/blob/056d7cc2/support/cas/pom.xml
----------------------------------------------------------------------
diff --git a/support/cas/pom.xml b/support/cas/pom.xml
new file mode 100644
index 0000000..387f018
--- /dev/null
+++ b/support/cas/pom.xml
@@ -0,0 +1,89 @@
+<?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">
+
+    <parent>
+        <groupId>org.apache.shiro</groupId>
+        <artifactId>shiro-root</artifactId>
+        <version>1.4.0-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>shiro-cas</artifactId>
+    <name>Apache Shiro :: Support :: CAS</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jasig.cas.client</groupId>
+            <artifactId>cas-client-core</artifactId>
+            <version>3.2.2</version>
+        </dependency>
+        <dependency>
+            <!-- for Optional SAML ticket validation: -->
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <!-- for Optional SAML ticket validation: -->
+            <groupId>org.opensaml</groupId>
+            <artifactId>opensaml</artifactId>
+            <version>1.1</version>
+            <scope>runtime</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <!-- for Optional SAML ticket validation: -->
+            <groupId>org.apache.santuario</groupId>
+            <artifactId>xmlsec</artifactId>
+            <version>1.4.3</version>
+            <scope>runtime</scope>
+            <optional>true</optional>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>org.apache.shiro.cas</Bundle-SymbolicName>
+                        <Export-Package>org.apache.shiro.cas*;version=${project.version}</Export-Package>
+                        <Import-Package>
+                            org.apache.shiro*;version="${shiro.osgi.importRange}",
+                            org.jasig.cas.client*;version="[3.2, 4)",
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/shiro/blob/056d7cc2/support/cas/src/main/java/org/apache/shiro/cas/CasAuthenticationException.java
----------------------------------------------------------------------
diff --git a/support/cas/src/main/java/org/apache/shiro/cas/CasAuthenticationException.java b/support/cas/src/main/java/org/apache/shiro/cas/CasAuthenticationException.java
new file mode 100644
index 0000000..e3add40
--- /dev/null
+++ b/support/cas/src/main/java/org/apache/shiro/cas/CasAuthenticationException.java
@@ -0,0 +1,46 @@
+/*
+ * 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 org.apache.shiro.cas;
+
+import org.apache.shiro.authc.AuthenticationException;
+
+/**
+ * @since 1.2
+ * @see <a href="https://github.com/bujiio/buji-pac4j">buji-pac4j</a>
+ * @deprecated replaced with Shiro integration in <a href="https://github.com/bujiio/buji-pac4j">buji-pac4j</a>.
+ */
+@Deprecated
+public class CasAuthenticationException extends AuthenticationException {
+
+    public CasAuthenticationException() {
+        super();
+    }
+
+    public CasAuthenticationException(String message) {
+        super(message);
+    }
+
+    public CasAuthenticationException(Throwable cause) {
+        super(cause);
+    }
+
+    public CasAuthenticationException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}

http://git-wip-us.apache.org/repos/asf/shiro/blob/056d7cc2/support/cas/src/main/java/org/apache/shiro/cas/CasFilter.java
----------------------------------------------------------------------
diff --git a/support/cas/src/main/java/org/apache/shiro/cas/CasFilter.java b/support/cas/src/main/java/org/apache/shiro/cas/CasFilter.java
new file mode 100644
index 0000000..88262a8
--- /dev/null
+++ b/support/cas/src/main/java/org/apache/shiro/cas/CasFilter.java
@@ -0,0 +1,156 @@
+/*
+ * 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 org.apache.shiro.cas;
+
+import org.apache.shiro.authc.AuthenticationException;
+import org.apache.shiro.authc.AuthenticationToken;
+import org.apache.shiro.subject.Subject;
+import org.apache.shiro.web.filter.authc.AuthenticatingFilter;
+import org.apache.shiro.web.util.WebUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+
+/**
+ * This filter validates the CAS service ticket to authenticate the user.  It must be configured on the URL recognized
+ * by the CAS server.  For example, in {@code shiro.ini}:
+ * <pre>
+ * [main]
+ * casFilter = org.apache.shiro.cas.CasFilter
+ * ...
+ *
+ * [urls]
+ * /shiro-cas = casFilter
+ * ...
+ * </pre>
+ * (example : http://host:port/mycontextpath/shiro-cas)
+ *
+ * @since 1.2
+ * @see <a href="https://github.com/bujiio/buji-pac4j">buji-pac4j</a>
+ * @deprecated replaced with Shiro integration in <a href="https://github.com/bujiio/buji-pac4j">buji-pac4j</a>.
+ */
+@Deprecated
+public class CasFilter extends AuthenticatingFilter {
+    
+    private static Logger logger = LoggerFactory.getLogger(CasFilter.class);
+    
+    // the name of the parameter service ticket in url
+    private static final String TICKET_PARAMETER = "ticket";
+    
+    // the url where the application is redirected if the CAS service ticket validation failed (example : /mycontextpatch/cas_error.jsp)
+    private String failureUrl;
+    
+    /**
+     * The token created for this authentication is a CasToken containing the CAS service ticket received on the CAS service url (on which
+     * the filter must be configured).
+     * 
+     * @param request the incoming request
+     * @param response the outgoing response
+     * @throws Exception if there is an error processing the request.
+     */
+    @Override
+    protected AuthenticationToken createToken(ServletRequest request, ServletResponse response) throws Exception {
+        HttpServletRequest httpRequest = (HttpServletRequest) request;
+        String ticket = httpRequest.getParameter(TICKET_PARAMETER);
+        return new CasToken(ticket);
+    }
+    
+    /**
+     * Execute login by creating {@link #createToken(javax.servlet.ServletRequest, javax.servlet.ServletResponse) token} and logging subject
+     * with this token.
+     * 
+     * @param request the incoming request
+     * @param response the outgoing response
+     * @throws Exception if there is an error processing the request.
+     */
+    @Override
+    protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception {
+        return executeLogin(request, response);
+    }
+    
+    /**
+     * Returns <code>false</code> to always force authentication (user is never considered authenticated by this filter).
+     * 
+     * @param request the incoming request
+     * @param response the outgoing response
+     * @param mappedValue the filter-specific config value mapped to this filter in the URL rules mappings.
+     * @return <code>false</code>
+     */
+    @Override
+    protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) {
+        return false;
+    }
+    
+    /**
+     * If login has been successful, redirect user to the original protected url.
+     * 
+     * @param token the token representing the current authentication
+     * @param subject the current authenticated subjet
+     * @param request the incoming request
+     * @param response the outgoing response
+     * @throws Exception if there is an error processing the request.
+     */
+    @Override
+    protected boolean onLoginSuccess(AuthenticationToken token, Subject subject, ServletRequest request,
+                                     ServletResponse response) throws Exception {
+        issueSuccessRedirect(request, response);
+        return false;
+    }
+    
+    /**
+     * If login has failed, redirect user to the CAS error page (no ticket or ticket validation failed) except if the user is already
+     * authenticated, in which case redirect to the default success url.
+     * 
+     * @param token the token representing the current authentication
+     * @param ae the current authentication exception
+     * @param request the incoming request
+     * @param response the outgoing response
+     */
+    @Override
+    protected boolean onLoginFailure(AuthenticationToken token, AuthenticationException ae, ServletRequest request,
+                                     ServletResponse response) {
+        if (logger.isDebugEnabled()) {
+            logger.debug( "Authentication exception", ae );
+        }
+        // is user authenticated or in remember me mode ?
+        Subject subject = getSubject(request, response);
+        if (subject.isAuthenticated() || subject.isRemembered()) {
+            try {
+                issueSuccessRedirect(request, response);
+            } catch (Exception e) {
+                logger.error("Cannot redirect to the default success url", e);
+            }
+        } else {
+            try {
+                WebUtils.issueRedirect(request, response, failureUrl);
+            } catch (IOException e) {
+                logger.error("Cannot redirect to failure url : {}", failureUrl, e);
+            }
+        }
+        return false;
+    }
+    
+    public void setFailureUrl(String failureUrl) {
+        this.failureUrl = failureUrl;
+    }
+}

http://git-wip-us.apache.org/repos/asf/shiro/blob/056d7cc2/support/cas/src/main/java/org/apache/shiro/cas/CasRealm.java
----------------------------------------------------------------------
diff --git a/support/cas/src/main/java/org/apache/shiro/cas/CasRealm.java b/support/cas/src/main/java/org/apache/shiro/cas/CasRealm.java
new file mode 100644
index 0000000..791674a
--- /dev/null
+++ b/support/cas/src/main/java/org/apache/shiro/cas/CasRealm.java
@@ -0,0 +1,313 @@
+/*
+ * 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 org.apache.shiro.cas;
+
+import org.apache.shiro.authc.AuthenticationException;
+import org.apache.shiro.authc.AuthenticationInfo;
+import org.apache.shiro.authc.AuthenticationToken;
+import org.apache.shiro.authc.SimpleAuthenticationInfo;
+import org.apache.shiro.authz.AuthorizationInfo;
+import org.apache.shiro.authz.SimpleAuthorizationInfo;
+import org.apache.shiro.realm.AuthorizingRealm;
+import org.apache.shiro.subject.PrincipalCollection;
+import org.apache.shiro.subject.SimplePrincipalCollection;
+import org.apache.shiro.util.CollectionUtils;
+import org.apache.shiro.util.StringUtils;
+import org.jasig.cas.client.authentication.AttributePrincipal;
+import org.jasig.cas.client.validation.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * This realm implementation acts as a CAS client to a CAS server for authentication and basic authorization.
+ * <p/>
+ * This realm functions by inspecting a submitted {@link org.apache.shiro.cas.CasToken CasToken} (which essentially 
+ * wraps a CAS service ticket) and validates it against the CAS server using a configured CAS
+ * {@link org.jasig.cas.client.validation.TicketValidator TicketValidator}.
+ * <p/>
+ * The {@link #getValidationProtocol() validationProtocol} is {@code CAS} by default, which indicates that a
+ * a {@link org.jasig.cas.client.validation.Cas20ServiceTicketValidator Cas20ServiceTicketValidator}
+ * will be used for ticket validation.  You can alternatively set
+ * or {@link org.jasig.cas.client.validation.Saml11TicketValidator Saml11TicketValidator} of CAS client. It is based on
+ * {@link AuthorizingRealm AuthorizingRealm} for both authentication and authorization. User id and attributes are retrieved from the CAS
+ * service ticket validation response during authentication phase. Roles and permissions are computed during authorization phase (according
+ * to the attributes previously retrieved).
+ *
+ * @since 1.2
+ * @see <a href="https://github.com/bujiio/buji-pac4j">buji-pac4j</a>
+ * @deprecated replaced with Shiro integration in <a href="https://github.com/bujiio/buji-pac4j">buji-pac4j</a>.
+ */
+@Deprecated
+public class CasRealm extends AuthorizingRealm {
+
+    // default name of the CAS attribute for remember me authentication (CAS 3.4.10+)
+    public static final String DEFAULT_REMEMBER_ME_ATTRIBUTE_NAME = "longTermAuthenticationRequestTokenUsed";
+    public static final String DEFAULT_VALIDATION_PROTOCOL = "CAS";
+    
+    private static Logger log = LoggerFactory.getLogger(CasRealm.class);
+    
+    // this is the url of the CAS server (example : http://host:port/cas)
+    private String casServerUrlPrefix;
+    
+    // this is the CAS service url of the application (example : http://host:port/mycontextpath/shiro-cas)
+    private String casService;
+    
+    /* CAS protocol to use for ticket validation : CAS (default) or SAML :
+       - CAS protocol can be used with CAS server version < 3.1 : in this case, no user attributes can be retrieved from the CAS ticket validation response (except if there are some customizations on CAS server side)
+       - SAML protocol can be used with CAS server version >= 3.1 : in this case, user attributes can be extracted from the CAS ticket validation response
+    */
+    private String validationProtocol = DEFAULT_VALIDATION_PROTOCOL;
+    
+    // default name of the CAS attribute for remember me authentication (CAS 3.4.10+)
+    private String rememberMeAttributeName = DEFAULT_REMEMBER_ME_ATTRIBUTE_NAME;
+    
+    // this class from the CAS client is used to validate a service ticket on CAS server
+    private TicketValidator ticketValidator;
+    
+    // default roles to applied to authenticated user
+    private String defaultRoles;
+    
+    // default permissions to applied to authenticated user
+    private String defaultPermissions;
+    
+    // names of attributes containing roles
+    private String roleAttributeNames;
+    
+    // names of attributes containing permissions
+    private String permissionAttributeNames;
+    
+    public CasRealm() {
+        setAuthenticationTokenClass(CasToken.class);
+    }
+
+    @Override
+    protected void onInit() {
+        super.onInit();
+        ensureTicketValidator();
+    }
+
+    protected TicketValidator ensureTicketValidator() {
+        if (this.ticketValidator == null) {
+            this.ticketValidator = createTicketValidator();
+        }
+        return this.ticketValidator;
+    }
+    
+    protected TicketValidator createTicketValidator() {
+        String urlPrefix = getCasServerUrlPrefix();
+        if ("saml".equalsIgnoreCase(getValidationProtocol())) {
+            return new Saml11TicketValidator(urlPrefix);
+        }
+        return new Cas20ServiceTicketValidator(urlPrefix);
+    }
+    
+    /**
+     * Authenticates a user and retrieves its information.
+     * 
+     * @param token the authentication token
+     * @throws AuthenticationException if there is an error during authentication.
+     */
+    @Override
+    @SuppressWarnings("unchecked")
+    protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException {
+        CasToken casToken = (CasToken) token;
+        if (token == null) {
+            return null;
+        }
+        
+        String ticket = (String)casToken.getCredentials();
+        if (!StringUtils.hasText(ticket)) {
+            return null;
+        }
+        
+        TicketValidator ticketValidator = ensureTicketValidator();
+
+        try {
+            // contact CAS server to validate service ticket
+            Assertion casAssertion = ticketValidator.validate(ticket, getCasService());
+            // get principal, user id and attributes
+            AttributePrincipal casPrincipal = casAssertion.getPrincipal();
+            String userId = casPrincipal.getName();
+            log.debug("Validate ticket : {} in CAS server : {} to retrieve user : {}", new Object[]{
+                    ticket, getCasServerUrlPrefix(), userId
+            });
+
+            Map<String, Object> attributes = casPrincipal.getAttributes();
+            // refresh authentication token (user id + remember me)
+            casToken.setUserId(userId);
+            String rememberMeAttributeName = getRememberMeAttributeName();
+            String rememberMeStringValue = (String)attributes.get(rememberMeAttributeName);
+            boolean isRemembered = rememberMeStringValue != null && Boolean.parseBoolean(rememberMeStringValue);
+            if (isRemembered) {
+                casToken.setRememberMe(true);
+            }
+            // create simple authentication info
+            List<Object> principals = CollectionUtils.asList(userId, attributes);
+            PrincipalCollection principalCollection = new SimplePrincipalCollection(principals, getName());
+            return new SimpleAuthenticationInfo(principalCollection, ticket);
+        } catch (TicketValidationException e) { 
+            throw new CasAuthenticationException("Unable to validate ticket [" + ticket + "]", e);
+        }
+    }
+    
+    /**
+     * Retrieves the AuthorizationInfo for the given principals (the CAS previously authenticated user : id + attributes).
+     * 
+     * @param principals the primary identifying principals of the AuthorizationInfo that should be retrieved.
+     * @return the AuthorizationInfo associated with this principals.
+     */
+    @Override
+    @SuppressWarnings("unchecked")
+    protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
+        // retrieve user information
+        SimplePrincipalCollection principalCollection = (SimplePrincipalCollection) principals;
+        List<Object> listPrincipals = principalCollection.asList();
+        Map<String, String> attributes = (Map<String, String>) listPrincipals.get(1);
+        // create simple authorization info
+        SimpleAuthorizationInfo simpleAuthorizationInfo = new SimpleAuthorizationInfo();
+        // add default roles
+        addRoles(simpleAuthorizationInfo, split(defaultRoles));
+        // add default permissions
+        addPermissions(simpleAuthorizationInfo, split(defaultPermissions));
+        // get roles from attributes
+        List<String> attributeNames = split(roleAttributeNames);
+        for (String attributeName : attributeNames) {
+            String value = attributes.get(attributeName);
+            addRoles(simpleAuthorizationInfo, split(value));
+        }
+        // get permissions from attributes
+        attributeNames = split(permissionAttributeNames);
+        for (String attributeName : attributeNames) {
+            String value = attributes.get(attributeName);
+            addPermissions(simpleAuthorizationInfo, split(value));
+        }
+        return simpleAuthorizationInfo;
+    }
+    
+    /**
+     * Split a string into a list of not empty and trimmed strings, delimiter is a comma.
+     * 
+     * @param s the input string
+     * @return the list of not empty and trimmed strings
+     */
+    private List<String> split(String s) {
+        List<String> list = new ArrayList<String>();
+        String[] elements = StringUtils.split(s, ',');
+        if (elements != null && elements.length > 0) {
+            for (String element : elements) {
+                if (StringUtils.hasText(element)) {
+                    list.add(element.trim());
+                }
+            }
+        }
+        return list;
+    }
+    
+    /**
+     * Add roles to the simple authorization info.
+     * 
+     * @param simpleAuthorizationInfo
+     * @param roles the list of roles to add
+     */
+    private void addRoles(SimpleAuthorizationInfo simpleAuthorizationInfo, List<String> roles) {
+        for (String role : roles) {
+            simpleAuthorizationInfo.addRole(role);
+        }
+    }
+    
+    /**
+     * Add permissions to the simple authorization info.
+     * 
+     * @param simpleAuthorizationInfo
+     * @param permissions the list of permissions to add
+     */
+    private void addPermissions(SimpleAuthorizationInfo simpleAuthorizationInfo, List<String> permissions) {
+        for (String permission : permissions) {
+            simpleAuthorizationInfo.addStringPermission(permission);
+        }
+    }
+
+    public String getCasServerUrlPrefix() {
+        return casServerUrlPrefix;
+    }
+
+    public void setCasServerUrlPrefix(String casServerUrlPrefix) {
+        this.casServerUrlPrefix = casServerUrlPrefix;
+    }
+
+    public String getCasService() {
+        return casService;
+    }
+
+    public void setCasService(String casService) {
+        this.casService = casService;
+    }
+
+    public String getValidationProtocol() {
+        return validationProtocol;
+    }
+
+    public void setValidationProtocol(String validationProtocol) {
+        this.validationProtocol = validationProtocol;
+    }
+
+    public String getRememberMeAttributeName() {
+        return rememberMeAttributeName;
+    }
+
+    public void setRememberMeAttributeName(String rememberMeAttributeName) {
+        this.rememberMeAttributeName = rememberMeAttributeName;
+    }
+
+    public String getDefaultRoles() {
+        return defaultRoles;
+    }
+
+    public void setDefaultRoles(String defaultRoles) {
+        this.defaultRoles = defaultRoles;
+    }
+
+    public String getDefaultPermissions() {
+        return defaultPermissions;
+    }
+
+    public void setDefaultPermissions(String defaultPermissions) {
+        this.defaultPermissions = defaultPermissions;
+    }
+
+    public String getRoleAttributeNames() {
+        return roleAttributeNames;
+    }
+
+    public void setRoleAttributeNames(String roleAttributeNames) {
+        this.roleAttributeNames = roleAttributeNames;
+    }
+
+    public String getPermissionAttributeNames() {
+        return permissionAttributeNames;
+    }
+
+    public void setPermissionAttributeNames(String permissionAttributeNames) {
+        this.permissionAttributeNames = permissionAttributeNames;
+    }
+}

http://git-wip-us.apache.org/repos/asf/shiro/blob/056d7cc2/support/cas/src/main/java/org/apache/shiro/cas/CasSubjectFactory.java
----------------------------------------------------------------------
diff --git a/support/cas/src/main/java/org/apache/shiro/cas/CasSubjectFactory.java b/support/cas/src/main/java/org/apache/shiro/cas/CasSubjectFactory.java
new file mode 100644
index 0000000..51a774e
--- /dev/null
+++ b/support/cas/src/main/java/org/apache/shiro/cas/CasSubjectFactory.java
@@ -0,0 +1,59 @@
+/*
+ * 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 org.apache.shiro.cas;
+
+import org.apache.shiro.authc.AuthenticationToken;
+import org.apache.shiro.subject.Subject;
+import org.apache.shiro.subject.SubjectContext;
+import org.apache.shiro.web.mgt.DefaultWebSubjectFactory;
+
+/**
+ * {@link org.apache.shiro.mgt.SubjectFactory Subject} implementation to be used in CAS-enabled applications.
+ *
+ * @since 1.2
+ * @see <a href="https://github.com/bujiio/buji-pac4j">buji-pac4j</a>
+ * @deprecated replaced with Shiro integration in <a href="https://github.com/bujiio/buji-pac4j">buji-pac4j</a>.
+ */
+@Deprecated
+public class CasSubjectFactory extends DefaultWebSubjectFactory {
+
+    @Override
+    public Subject createSubject(SubjectContext context) {
+
+        //the authenticated flag is only set by the SecurityManager after a successful authentication attempt.
+        boolean authenticated = context.isAuthenticated();
+
+        //although the SecurityManager 'sees' the submission as a successful authentication, in reality, the
+        //login might have been just a CAS rememberMe login.  If so, set the authenticated flag appropriately:
+        if (authenticated) {
+
+            AuthenticationToken token = context.getAuthenticationToken();
+
+            if (token != null && token instanceof CasToken) {
+                CasToken casToken = (CasToken) token;
+                // set the authenticated flag of the context to true only if the CAS subject is not in a remember me mode
+                if (casToken.isRememberMe()) {
+                    context.setAuthenticated(false);
+                }
+            }
+        }
+
+        return super.createSubject(context);
+    }
+}

http://git-wip-us.apache.org/repos/asf/shiro/blob/056d7cc2/support/cas/src/main/java/org/apache/shiro/cas/CasToken.java
----------------------------------------------------------------------
diff --git a/support/cas/src/main/java/org/apache/shiro/cas/CasToken.java b/support/cas/src/main/java/org/apache/shiro/cas/CasToken.java
new file mode 100644
index 0000000..221d1cb
--- /dev/null
+++ b/support/cas/src/main/java/org/apache/shiro/cas/CasToken.java
@@ -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 org.apache.shiro.cas;
+
+import org.apache.shiro.authc.RememberMeAuthenticationToken;
+
+/**
+ * This class represents a token for a CAS authentication (service ticket + user id + remember me).
+ *
+ * @since 1.2
+ * @see <a href="https://github.com/bujiio/buji-pac4j">buji-pac4j</a>
+ * @deprecated replaced with Shiro integration in <a href="https://github.com/bujiio/buji-pac4j">buji-pac4j</a>.
+ */
+@Deprecated
+public class CasToken implements RememberMeAuthenticationToken {
+    
+    private static final long serialVersionUID = 8587329689973009598L;
+    
+    // the service ticket returned by the CAS server
+    private String ticket = null;
+    
+    // the user identifier
+    private String userId = null;
+    
+    // is the user in a remember me mode ?
+    private boolean isRememberMe = false;
+    
+    public CasToken(String ticket) {
+        this.ticket = ticket;
+    }
+    
+    public Object getPrincipal() {
+        return userId;
+    }
+    
+    public Object getCredentials() {
+        return ticket;
+    }
+    
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+    
+    public boolean isRememberMe() {
+        return isRememberMe;
+    }
+    
+    public void setRememberMe(boolean isRememberMe) {
+        this.isRememberMe = isRememberMe;
+    }
+}

http://git-wip-us.apache.org/repos/asf/shiro/blob/056d7cc2/support/cas/src/test/groovy/org/apache/shiro/cas/CasRealmTest.groovy
----------------------------------------------------------------------
diff --git a/support/cas/src/test/groovy/org/apache/shiro/cas/CasRealmTest.groovy b/support/cas/src/test/groovy/org/apache/shiro/cas/CasRealmTest.groovy
new file mode 100644
index 0000000..baf2a57
--- /dev/null
+++ b/support/cas/src/test/groovy/org/apache/shiro/cas/CasRealmTest.groovy
@@ -0,0 +1,176 @@
+/*
+ * 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 org.apache.shiro.cas
+
+import org.apache.shiro.authc.AuthenticationInfo
+import org.apache.shiro.authz.AuthorizationInfo
+
+/**
+ * Unit tests for the {@link CasRealm} implementation.
+ *
+ * @since 1.2
+ * @see <a href="https://github.com/bujiio/buji-pac4j">buji-pac4j</a>
+ * @deprecated replaced with Shiro integration in <a href="https://github.com/bujiio/buji-pac4j">buji-pac4j</a>.
+ */
+@Deprecated
+class CasRealmTest extends GroovyTestCase {
+
+    /**
+     * Creates a CAS realm with a ticket validator mock.
+     *
+     * @return CasRealm The CAS realm for testing.
+     */
+    private CasRealm createCasRealm() {
+        new CasRealm(ticketValidator: new MockServiceTicketValidator());
+    }
+
+    void testNoAttribute() {
+        CasRealm casRealm = createCasRealm();
+        CasToken casToken = new CasToken('$=defaultId');
+        AuthenticationInfo authenticationInfo = casRealm.doGetAuthenticationInfo(casToken);
+        def principals = authenticationInfo.principals
+        assertEquals "defaultId", principals.primaryPrincipal
+        def attributes = principals.asList()[1] //returns a map
+        assertEquals 0, attributes.size()
+        AuthorizationInfo authorizationInfo = casRealm.doGetAuthorizationInfo(principals);
+        assertNull authorizationInfo.stringPermissions
+        assertNull authorizationInfo.roles
+    }
+
+    void testNoAttributeDefaultRoleAndPermission() {
+        CasRealm casRealm = createCasRealm();
+        casRealm.defaultRoles = "defaultRole"
+        casRealm.defaultPermissions = "defaultPermission"
+        CasToken casToken = new CasToken('$=defaultId');
+        AuthenticationInfo authenticationInfo = casRealm.doGetAuthenticationInfo(casToken);
+        def principals = authenticationInfo.principals
+        assertEquals "defaultId", principals.primaryPrincipal
+        def attributes = principals.oneByType(Map)
+        assertEquals 0, attributes.size()
+        AuthorizationInfo authorizationInfo = casRealm.doGetAuthorizationInfo(principals);
+        assertTrue authorizationInfo.roles.contains("defaultRole")
+        assertTrue authorizationInfo.stringPermissions.contains("defaultPermission")
+    }
+
+    void testNoAttributeDefaultRolesAndPermissions() {
+        CasRealm casRealm = createCasRealm();
+        casRealm.defaultRoles = "defaultRole1, defaultRole2"
+        casRealm.defaultPermissions = "defaultPermission1,defaultPermission2"
+        CasToken casToken = new CasToken('$=defaultId');
+        AuthenticationInfo authcInfo = casRealm.doGetAuthenticationInfo(casToken);
+        def principals = authcInfo.principals
+        assertEquals "defaultId", principals.primaryPrincipal
+        def attributes = principals.oneByType(Map)
+        assertEquals 0, attributes.size()
+        AuthorizationInfo authzInfo = casRealm.doGetAuthorizationInfo(principals)
+        assertEquals 2, authzInfo.roles.size()
+        assertTrue authzInfo.roles.contains("defaultRole1")
+        assertTrue authzInfo.roles.contains("defaultRole2")
+        assertEquals 2, authzInfo.stringPermissions.size()
+        assertTrue authzInfo.stringPermissions.contains("defaultPermission1")
+        assertTrue authzInfo.stringPermissions.contains("defaultPermission2")
+    }
+
+    void testRoleAndPermission() {
+        CasRealm casRealm = createCasRealm();
+        casRealm.roleAttributeNames = "role"
+        casRealm.permissionAttributeNames = "permission"
+        CasToken casToken = new CasToken('$=defaultId|role=aRole|permission=aPermission');
+        AuthenticationInfo authcInfo = casRealm.doGetAuthenticationInfo(casToken);
+        def principals = authcInfo.principals
+        assertEquals "defaultId", principals.primaryPrincipal
+        def attributes = principals.oneByType(Map)
+        assertEquals 2, attributes.size()
+        assertEquals "aRole", attributes['role']
+        assertEquals "aPermission", attributes['permission']
+        AuthorizationInfo authzInfo = casRealm.doGetAuthorizationInfo(principals);
+        assertTrue authzInfo.roles.contains("aRole")
+        assertTrue authzInfo.stringPermissions.contains("aPermission")
+    }
+
+    void testRolesAndPermissions() {
+        CasRealm casRealm = createCasRealm();
+        casRealm.setRoleAttributeNames("role1 , role2");
+        casRealm.setPermissionAttributeNames("permission1,permission2");
+        CasToken casToken = new CasToken(
+                '$=defaultId|role1=role11 , role12|role2=role21,role22|permission1=permission11, permission12|permission2=permission21 ,permission22');
+        AuthenticationInfo authcInfo = casRealm.doGetAuthenticationInfo(casToken);
+        def principals = authcInfo.principals
+        assertEquals "defaultId", principals.primaryPrincipal
+        def attributes = principals.oneByType(Map)
+        assertEquals "role11 , role12", attributes['role1']
+        assertEquals "role21,role22", attributes['role2']
+        assertEquals "permission11, permission12", attributes['permission1']
+        assertEquals "permission21 ,permission22", attributes['permission2']
+        AuthorizationInfo authzInfo = casRealm.doGetAuthorizationInfo(principals);
+        assertEquals 4, authzInfo.roles.size()
+        assertTrue authzInfo.roles.contains("role11")
+        assertTrue authzInfo.roles.contains("role12")
+        assertTrue authzInfo.roles.contains("role21")
+        assertTrue authzInfo.roles.contains("role22")
+        assertTrue authzInfo.stringPermissions.contains("permission11")
+        assertTrue authzInfo.stringPermissions.contains("permission12")
+        assertTrue authzInfo.stringPermissions.contains("permission21")
+        assertTrue authzInfo.stringPermissions.contains("permission22")
+    }
+
+    void testNotRememberMe() {
+        CasRealm casRealm = createCasRealm();
+        CasToken casToken = new CasToken("\$=defaultId|$CasRealm.DEFAULT_REMEMBER_ME_ATTRIBUTE_NAME=false");
+        AuthenticationInfo authcInfo = casRealm.doGetAuthenticationInfo(casToken);
+        def principals = authcInfo.principals
+        assertEquals "defaultId", principals.primaryPrincipal
+        def attributes = principals.oneByType(Map)
+        assertEquals "false", attributes[CasRealm.DEFAULT_REMEMBER_ME_ATTRIBUTE_NAME]
+        assertFalse casToken.rememberMe
+        AuthorizationInfo authzInfo = casRealm.doGetAuthorizationInfo(principals);
+        assertNull authzInfo.stringPermissions
+        assertNull authzInfo.roles
+    }
+
+    void testRememberMe() {
+        CasRealm casRealm = createCasRealm();
+        CasToken casToken = new CasToken("\$=defaultId|$CasRealm.DEFAULT_REMEMBER_ME_ATTRIBUTE_NAME=true");
+        AuthenticationInfo authcInfo = casRealm.doGetAuthenticationInfo(casToken);
+        def principals = authcInfo.principals
+        assertEquals "defaultId", principals.primaryPrincipal
+        def attributes = principals.oneByType(Map)
+        assertEquals "true", attributes[CasRealm.DEFAULT_REMEMBER_ME_ATTRIBUTE_NAME]
+        assertTrue casToken.rememberMe
+        AuthorizationInfo authzInfo = casRealm.doGetAuthorizationInfo(principals);
+        assertNull authzInfo.stringPermissions
+        assertNull authzInfo.roles
+    }
+
+    void testRememberMeNewAttributeName() {
+        CasRealm casRealm = createCasRealm();
+        casRealm.rememberMeAttributeName = "rme"
+        CasToken casToken = new CasToken('$=defaultId|rme=true');
+        AuthenticationInfo authcInfo = casRealm.doGetAuthenticationInfo(casToken);
+        def principals = authcInfo.principals
+        assertEquals "defaultId", principals.primaryPrincipal
+        def attributes = principals.oneByType(Map)
+        assertEquals "true", attributes[casRealm.rememberMeAttributeName]
+        assertTrue casToken.rememberMe
+        AuthorizationInfo authzInfo = casRealm.doGetAuthorizationInfo(principals);
+        assertNull authzInfo.stringPermissions
+        assertNull authzInfo.roles
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/shiro/blob/056d7cc2/support/cas/src/test/groovy/org/apache/shiro/cas/CasTokenTest.groovy
----------------------------------------------------------------------
diff --git a/support/cas/src/test/groovy/org/apache/shiro/cas/CasTokenTest.groovy b/support/cas/src/test/groovy/org/apache/shiro/cas/CasTokenTest.groovy
new file mode 100644
index 0000000..ae86eee
--- /dev/null
+++ b/support/cas/src/test/groovy/org/apache/shiro/cas/CasTokenTest.groovy
@@ -0,0 +1,49 @@
+/*
+ * 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 org.apache.shiro.cas
+
+/**
+ * Unit tests for the {@link CasToken} implementation.
+ *
+ * @since 1.2
+ * @see <a href="https://github.com/bujiio/buji-pac4j">buji-pac4j</a>
+ * @deprecated replaced with Shiro integration in <a href="https://github.com/bujiio/buji-pac4j">buji-pac4j</a>.
+ */
+@Deprecated
+class CasTokenTest extends GroovyTestCase {
+
+    void testPrincipal() {
+        CasToken casToken = new CasToken("fakeTicket")
+        assertNull casToken.principal
+        casToken.userId = "myUserId"
+        assertEquals "myUserId", casToken.principal
+    }
+
+    void testCredentials() {
+        CasToken casToken = new CasToken("fakeTicket")
+        assertEquals "fakeTicket", casToken.credentials
+    }
+
+    void testRememberMe() {
+        CasToken casToken = new CasToken("fakeTicket")
+        assertFalse casToken.rememberMe
+        casToken.rememberMe = true
+        assertTrue casToken.rememberMe
+    }
+}

http://git-wip-us.apache.org/repos/asf/shiro/blob/056d7cc2/support/cas/src/test/groovy/org/apache/shiro/cas/MockServiceTicketValidator.groovy
----------------------------------------------------------------------
diff --git a/support/cas/src/test/groovy/org/apache/shiro/cas/MockServiceTicketValidator.groovy b/support/cas/src/test/groovy/org/apache/shiro/cas/MockServiceTicketValidator.groovy
new file mode 100644
index 0000000..fc46ab2
--- /dev/null
+++ b/support/cas/src/test/groovy/org/apache/shiro/cas/MockServiceTicketValidator.groovy
@@ -0,0 +1,60 @@
+/*
+ * 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 org.apache.shiro.cas
+
+import org.apache.shiro.util.StringUtils
+import org.jasig.cas.client.authentication.AttributePrincipalImpl
+import org.jasig.cas.client.validation.Assertion
+import org.jasig.cas.client.validation.AssertionImpl
+import org.jasig.cas.client.validation.TicketValidationException
+import org.jasig.cas.client.validation.TicketValidator
+
+/**
+ * @since 1.2
+ * @see <a href="https://github.com/bujiio/buji-pac4j">buji-pac4j</a>
+ * @deprecated replaced with Shiro integration in <a href="https://github.com/bujiio/buji-pac4j">buji-pac4j</a>.
+ */
+@Deprecated
+class MockServiceTicketValidator implements TicketValidator {
+
+    /**
+     * Returns different assertions according to the ticket input. The format of the mock ticket must be :
+     * key1=value1,key2=value2,...,keyN=valueN. If keyX is $, valueX is considered to be the name of the principal, otherwise (keyX, valueX)
+     * is considered to be an attribute of the principal.
+     */
+    public Assertion validate(String ticket, String service) throws TicketValidationException {
+        String name = null;
+        def attributes = [:]
+        String[] elements = StringUtils.split(ticket, '|' as char);
+        int length = elements.length;
+        for (int i = 0; i < length; i++) {
+            String[] pair = StringUtils.split(elements[i], '=' as char);
+            String key = pair[0].trim();
+            String value = pair[1].trim();
+            if ('$'.equals(key)) {
+                name = value;
+            } else {
+                attributes.put(key, value);
+            }
+        }
+        AttributePrincipalImpl attributePrincipalImpl = new AttributePrincipalImpl(name, attributes);
+        return new AssertionImpl(attributePrincipalImpl, [:]);
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/shiro/blob/056d7cc2/support/pom.xml
----------------------------------------------------------------------
diff --git a/support/pom.xml b/support/pom.xml
index e753d60..fd7f801 100644
--- a/support/pom.xml
+++ b/support/pom.xml
@@ -40,6 +40,7 @@
         <module>guice</module>
         <module>openid4j</module>
         <module>features</module>
+        <module>cas</module>
         <module>spring-boot</module>
         <module>servlet-plugin</module>
         <module>jaxrs</module>

http://git-wip-us.apache.org/repos/asf/shiro/blob/056d7cc2/test-coverage/pom.xml
----------------------------------------------------------------------
diff --git a/test-coverage/pom.xml b/test-coverage/pom.xml
index 8705d61..f088f32 100644
--- a/test-coverage/pom.xml
+++ b/test-coverage/pom.xml
@@ -46,6 +46,10 @@
         </dependency>
         <dependency>
             <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-cas</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
             <artifactId>shiro-ehcache</artifactId>
         </dependency>
         <dependency>


[6/8] shiro git commit: Moved CollectionUtils back to shiro-core

Posted by bd...@apache.org.
Moved CollectionUtils back to shiro-core

It really should stay in lang, but we cannot move it until 2.0 due to its dependency on PrincipalCollection


Project: http://git-wip-us.apache.org/repos/asf/shiro/repo
Commit: http://git-wip-us.apache.org/repos/asf/shiro/commit/d44204a4
Tree: http://git-wip-us.apache.org/repos/asf/shiro/tree/d44204a4
Diff: http://git-wip-us.apache.org/repos/asf/shiro/diff/d44204a4

Branch: refs/heads/master
Commit: d44204a4378f73e17be2e58097ba09d33c1cff3e
Parents: 3a23929
Author: Brian Demers <bd...@apache.org>
Authored: Mon Nov 7 13:25:31 2016 -0500
Committer: Brian Demers <bd...@apache.org>
Committed: Mon Nov 7 16:49:38 2016 -0500

----------------------------------------------------------------------
 .../java/org/apache/shiro/cache/MapCache.java   |   4 +-
 .../main/java/org/apache/shiro/config/Ini.java  |   3 +-
 .../apache/shiro/config/ReflectionBuilder.java  |  20 ++-
 .../shiro/config/ReflectionBuilderTest.groovy   |  29 ++--
 core/pom.xml                                    |   4 -
 .../org/apache/shiro/util/CollectionUtils.java  | 141 +++++++++++++++++++
 .../main/java/org/apache/shiro/util/Assert.java |  18 ++-
 .../org/apache/shiro/util/CollectionUtils.java  | 124 ----------------
 .../java/org/apache/shiro/util/StringUtils.java |  22 ++-
 .../org/apache/shiro/cache/ehcache/EhCache.java |  14 +-
 10 files changed, 221 insertions(+), 158 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/shiro/blob/d44204a4/cache/src/main/java/org/apache/shiro/cache/MapCache.java
----------------------------------------------------------------------
diff --git a/cache/src/main/java/org/apache/shiro/cache/MapCache.java b/cache/src/main/java/org/apache/shiro/cache/MapCache.java
index 04db6ec..024f5ef 100644
--- a/cache/src/main/java/org/apache/shiro/cache/MapCache.java
+++ b/cache/src/main/java/org/apache/shiro/cache/MapCache.java
@@ -18,8 +18,6 @@
  */
 package org.apache.shiro.cache;
 
-import org.apache.shiro.util.CollectionUtils;
-
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Map;
@@ -84,7 +82,7 @@ public class MapCache<K, V> implements Cache<K, V> {
 
     public Collection<V> values() {
         Collection<V> values = map.values();
-        if (!CollectionUtils.isEmpty(values)) {
+        if (!map.isEmpty()) {
             return Collections.unmodifiableCollection(values);
         }
         return Collections.emptySet();

http://git-wip-us.apache.org/repos/asf/shiro/blob/d44204a4/config/core/src/main/java/org/apache/shiro/config/Ini.java
----------------------------------------------------------------------
diff --git a/config/core/src/main/java/org/apache/shiro/config/Ini.java b/config/core/src/main/java/org/apache/shiro/config/Ini.java
index 46bdce4..d3d93cd 100644
--- a/config/core/src/main/java/org/apache/shiro/config/Ini.java
+++ b/config/core/src/main/java/org/apache/shiro/config/Ini.java
@@ -19,7 +19,6 @@
 package org.apache.shiro.config;
 
 import org.apache.shiro.io.ResourceUtils;
-import org.apache.shiro.util.CollectionUtils;
 import org.apache.shiro.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -438,7 +437,7 @@ public class Ini implements Map<String, Ini.Section> {
     }
 
     public String toString() {
-        if (CollectionUtils.isEmpty(this.sections)) {
+        if (this.sections == null || this.sections.isEmpty()) {
             return "<empty INI>";
         } else {
             StringBuilder sb = new StringBuilder("sections=");

http://git-wip-us.apache.org/repos/asf/shiro/blob/d44204a4/config/ogdl/src/main/java/org/apache/shiro/config/ReflectionBuilder.java
----------------------------------------------------------------------
diff --git a/config/ogdl/src/main/java/org/apache/shiro/config/ReflectionBuilder.java b/config/ogdl/src/main/java/org/apache/shiro/config/ReflectionBuilder.java
index b2da6a8..a39cc02 100644
--- a/config/ogdl/src/main/java/org/apache/shiro/config/ReflectionBuilder.java
+++ b/config/ogdl/src/main/java/org/apache/shiro/config/ReflectionBuilder.java
@@ -34,7 +34,6 @@ import org.apache.shiro.event.support.DefaultEventBus;
 import org.apache.shiro.util.Assert;
 import org.apache.shiro.util.ByteSource;
 import org.apache.shiro.util.ClassUtils;
-import org.apache.shiro.util.CollectionUtils;
 import org.apache.shiro.util.Factory;
 import org.apache.shiro.util.LifecycleUtils;
 import org.apache.shiro.util.Nameable;
@@ -126,7 +125,7 @@ public class ReflectionBuilder {
     }
 
     private void apply(Map<String, ?> objects) {
-        if(!CollectionUtils.isEmpty(objects)) {
+        if(!isEmpty(objects)) {
             this.objects.putAll(objects);
         }
         EventBus found = findEventBus(this.objects);
@@ -183,13 +182,13 @@ public class ReflectionBuilder {
     //@since 1.3
     private boolean isEventSubscriber(Object bean, String name) {
         List annotatedMethods = ClassUtils.getAnnotatedMethods(bean.getClass(), Subscribe.class);
-        return !CollectionUtils.isEmpty(annotatedMethods);
+        return !isEmpty(annotatedMethods);
     }
 
     //@since 1.3
     protected EventBus findEventBus(Map<String,?> objects) {
 
-        if (CollectionUtils.isEmpty(objects)) {
+        if (isEmpty(objects)) {
             return null;
         }
 
@@ -989,4 +988,17 @@ public class ReflectionBuilder {
         }
     }
 
+    //////////////////////////
+    // From CollectionUtils //
+    //////////////////////////
+    // CollectionUtils cannot be removed from shiro-core until 2.0 as it has a dependency on PrincipalCollection
+
+    private static boolean isEmpty(Map m) {
+        return m == null || m.isEmpty();
+    }
+
+    private static boolean isEmpty(Collection c) {
+        return c == null || c.isEmpty();
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/shiro/blob/d44204a4/config/ogdl/src/test/groovy/org/apache/shiro/config/ReflectionBuilderTest.groovy
----------------------------------------------------------------------
diff --git a/config/ogdl/src/test/groovy/org/apache/shiro/config/ReflectionBuilderTest.groovy b/config/ogdl/src/test/groovy/org/apache/shiro/config/ReflectionBuilderTest.groovy
index 5b12d4c..211e2fa 100644
--- a/config/ogdl/src/test/groovy/org/apache/shiro/config/ReflectionBuilderTest.groovy
+++ b/config/ogdl/src/test/groovy/org/apache/shiro/config/ReflectionBuilderTest.groovy
@@ -22,7 +22,6 @@ import org.apache.shiro.codec.Base64
 import org.apache.shiro.codec.CodecSupport
 import org.apache.shiro.codec.Hex
 import org.apache.shiro.config.event.BeanEvent
-import org.apache.shiro.util.CollectionUtils
 import org.junit.Test
 
 import static org.junit.Assert.*
@@ -277,7 +276,7 @@ class ReflectionBuilderTest {
         defs.put("compositeBean.simpleBeanSet", '$simpleBean1, $simpleBean2, $simpleBean2');
         ReflectionBuilder builder = new ReflectionBuilder();
         Map objects = builder.buildObjects(defs);
-        assertFalse(CollectionUtils.isEmpty(objects));
+        assertThat(objects, aMapWithSize(greaterThan(0)))
         CompositeBean cBean = (CompositeBean) objects.get("compositeBean");
         assertNotNull(cBean);
         Set<SimpleBean> simpleBeans = cBean.getSimpleBeanSet();
@@ -297,7 +296,7 @@ class ReflectionBuilderTest {
 
         ReflectionBuilder builder = new ReflectionBuilder(['set': set]);
         Map objects = builder.buildObjects(defs);
-        assertFalse(CollectionUtils.isEmpty(objects));
+        assertThat(objects, aMapWithSize(greaterThan(0)))
         CompositeBean cBean = (CompositeBean) objects.get("compositeBean");
         assertNotNull(cBean);
         Set<SimpleBean> simpleBeans = cBean.getSimpleBeanSet();
@@ -318,7 +317,7 @@ class ReflectionBuilderTest {
         defs.put("compositeBean.simpleBeanList", '$simpleBean1, $simpleBean2, $simpleBean2');
         ReflectionBuilder builder = new ReflectionBuilder();
         Map objects = builder.buildObjects(defs);
-        assertFalse(CollectionUtils.isEmpty(objects));
+        assertThat(objects, aMapWithSize(greaterThan(0)))
         CompositeBean cBean = (CompositeBean) objects.get("compositeBean");
         assertNotNull(cBean);
         List<SimpleBean> simpleBeans = cBean.getSimpleBeanList();
@@ -338,7 +337,7 @@ class ReflectionBuilderTest {
 
         ReflectionBuilder builder = new ReflectionBuilder(['list': list]);
         Map objects = builder.buildObjects(defs);
-        assertFalse(CollectionUtils.isEmpty(objects));
+        assertThat(objects, aMapWithSize(greaterThan(0)))
         CompositeBean cBean = (CompositeBean) objects.get("compositeBean");
         assertNotNull(cBean);
         def simpleBeans = cBean.getSimpleBeanList();
@@ -358,7 +357,7 @@ class ReflectionBuilderTest {
         defs.put("compositeBean.simpleBeanCollection", '$simpleBean1, $simpleBean2, $simpleBean2');
         ReflectionBuilder builder = new ReflectionBuilder();
         Map objects = builder.buildObjects(defs);
-        assertFalse(CollectionUtils.isEmpty(objects));
+        assertThat(objects, aMapWithSize(greaterThan(0)))
         CompositeBean cBean = (CompositeBean) objects.get("compositeBean");
         assertNotNull(cBean);
         Collection<SimpleBean> simpleBeans = cBean.getSimpleBeanCollection();
@@ -379,7 +378,7 @@ class ReflectionBuilderTest {
 
         ReflectionBuilder builder = new ReflectionBuilder(['collection': c]);
         Map objects = builder.buildObjects(defs);
-        assertFalse(CollectionUtils.isEmpty(objects));
+        assertThat(objects, aMapWithSize(greaterThan(0)))
         CompositeBean cBean = (CompositeBean) objects.get("compositeBean");
         assertNotNull(cBean);
         def simpleBeans = cBean.getSimpleBeanCollection();
@@ -403,7 +402,7 @@ class ReflectionBuilderTest {
         defs.put("simpleBean.byteArrayProp", hexValue);
         ReflectionBuilder builder = new ReflectionBuilder();
         Map objects = builder.buildObjects(defs);
-        assertFalse(CollectionUtils.isEmpty(objects));
+        assertThat(objects, aMapWithSize(greaterThan(0)))
         SimpleBean bean = (SimpleBean) objects.get("simpleBean");
         assertNotNull(bean);
         byte[] beanBytes = bean.getByteArrayProp();
@@ -440,7 +439,7 @@ class ReflectionBuilderTest {
         defs.put("compositeBean.simpleBeanMap", 'simpleBean1:$simpleBean1, simpleBean2:$simpleBean2');
         ReflectionBuilder builder = new ReflectionBuilder();
         Map objects = builder.buildObjects(defs);
-        assertFalse(CollectionUtils.isEmpty(objects));
+        assertThat(objects, aMapWithSize(greaterThan(0)))
         CompositeBean cBean = (CompositeBean) objects.get("compositeBean");
         assertNotNull(cBean);
         Map map = cBean.getSimpleBeanMap();
@@ -464,7 +463,7 @@ class ReflectionBuilderTest {
 
         ReflectionBuilder builder = new ReflectionBuilder(['map': map]);
         Map objects = builder.buildObjects(defs);
-        assertFalse(CollectionUtils.isEmpty(objects));
+        assertThat(objects, aMapWithSize(greaterThan(0)))
         CompositeBean cBean = (CompositeBean) objects.get("compositeBean");
         assertNotNull(cBean);
         def simpleBeansMap = cBean.getSimpleBeanMap();
@@ -486,7 +485,7 @@ class ReflectionBuilderTest {
         defs.put("compositeBean.simpleBean.simpleBeans", '$simpleBean2, $simpleBean3');
         ReflectionBuilder builder = new ReflectionBuilder();
         Map objects = builder.buildObjects(defs);
-        assertFalse(CollectionUtils.isEmpty(objects));
+        assertThat(objects, aMapWithSize(greaterThan(0)))
         CompositeBean cBean = (CompositeBean) objects.get("compositeBean");
         assertNotNull(cBean);
         SimpleBean nested = cBean.getSimpleBean();
@@ -519,7 +518,7 @@ class ReflectionBuilderTest {
 
         ReflectionBuilder builder = new ReflectionBuilder();
         Map objects = builder.buildObjects(defs);
-        assertFalse(CollectionUtils.isEmpty(objects));
+        assertThat(objects, aMapWithSize(greaterThan(0)))
         CompositeBean compositeBean = (CompositeBean) objects.get("compositeBean");
         SimpleBean bean = compositeBean.getSimpleBean();
         assertNotNull(bean);
@@ -546,7 +545,7 @@ class ReflectionBuilderTest {
 
         ReflectionBuilder builder = new ReflectionBuilder();
         Map<String, ?> objects = builder.buildObjects(ini.getSections().iterator().next());
-        assertFalse(CollectionUtils.isEmpty(objects));
+        assertThat(objects, aMapWithSize(greaterThan(0)))
 
         assertInstantiatedEvents("listenerOne", objects, 4) //3 beans following + its own instantiated event
         assertConfiguredEvents("listenerOne", objects, 4) //3 beans following + its own configured event
@@ -578,7 +577,7 @@ class ReflectionBuilderTest {
 
         ReflectionBuilder builder = new ReflectionBuilder();
         Map objects = builder.buildObjects(defs);
-        assertFalse(CollectionUtils.isEmpty(objects));
+        assertThat(objects, aMapWithSize(greaterThan(0)))
         CompositeBean compositeBean = (CompositeBean) objects.get("compositeBean");
         SimpleBean bean = compositeBean.getSimpleBean();
         assertNotNull(bean);
@@ -604,7 +603,7 @@ class ReflectionBuilderTest {
 
         ReflectionBuilder builder = new ReflectionBuilder();
         Map objects = builder.buildObjects(defs);
-        assertFalse(CollectionUtils.isEmpty(objects));
+        assertThat(objects, aMapWithSize(greaterThan(0)))
 
         CompositeBean compositeBean = (CompositeBean) objects.get("compositeBean");
         assertNotNull(compositeBean);

http://git-wip-us.apache.org/repos/asf/shiro/blob/d44204a4/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index a9343c5..39ea570 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -93,10 +93,6 @@
             <groupId>org.apache.shiro</groupId>
             <artifactId>shiro-event</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
 
         <!-- Test dependencies -->
         <dependency>

http://git-wip-us.apache.org/repos/asf/shiro/blob/d44204a4/core/src/main/java/org/apache/shiro/util/CollectionUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/shiro/util/CollectionUtils.java b/core/src/main/java/org/apache/shiro/util/CollectionUtils.java
new file mode 100644
index 0000000..67fc5c9
--- /dev/null
+++ b/core/src/main/java/org/apache/shiro/util/CollectionUtils.java
@@ -0,0 +1,141 @@
+/*
+ * 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 org.apache.shiro.util;
+
+import org.apache.shiro.subject.PrincipalCollection;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Static helper class for use dealing with Collections.
+ *
+ * @since 0.9
+ */
+public class CollectionUtils {
+
+    //TODO - complete JavaDoc
+
+    public static <E> Set<E> asSet(E... elements) {
+        if (elements == null || elements.length == 0) {
+            return Collections.emptySet();
+        }
+
+        if (elements.length == 1) {
+            return Collections.singleton(elements[0]);
+        }
+
+        LinkedHashSet<E> set = new LinkedHashSet<E>(elements.length * 4 / 3 + 1);
+        Collections.addAll(set, elements);
+        return set;
+    }
+
+    /**
+     * Returns {@code true} if the specified {@code Collection} is {@code null} or {@link Collection#isEmpty empty},
+     * {@code false} otherwise.
+     *
+     * @param c the collection to check
+     * @return {@code true} if the specified {@code Collection} is {@code null} or {@link Collection#isEmpty empty},
+     *         {@code false} otherwise.
+     * @since 1.0
+     */
+    public static boolean isEmpty(Collection c) {
+        return c == null || c.isEmpty();
+    }
+
+    /**
+     * Returns {@code true} if the specified {@code Map} is {@code null} or {@link Map#isEmpty empty},
+     * {@code false} otherwise.
+     *
+     * @param m the {@code Map} to check
+     * @return {@code true} if the specified {@code Map} is {@code null} or {@link Map#isEmpty empty},
+     *         {@code false} otherwise.
+     * @since 1.0
+     */
+    public static boolean isEmpty(Map m) {
+        return m == null || m.isEmpty();
+    }
+
+    /**
+     * Returns the size of the specified collection or {@code 0} if the collection is {@code null}.
+     *
+     * @param c the collection to check
+     * @return the size of the specified collection or {@code 0} if the collection is {@code null}.
+     * @since 1.2
+     */
+    public static int size(Collection c) {
+        return c != null ? c.size() : 0;
+    }
+
+    /**
+     * Returns the size of the specified map or {@code 0} if the map is {@code null}.
+     *
+     * @param m the map to check
+     * @return the size of the specified map or {@code 0} if the map is {@code null}.
+     * @since 1.2
+     */
+    public static int size(Map m) {
+        return m != null ? m.size() : 0;
+    }
+
+
+    /**
+     * Returns {@code true} if the specified {@code PrincipalCollection} is {@code null} or
+     * {@link PrincipalCollection#isEmpty empty}, {@code false} otherwise.
+     *
+     * @param principals the principals to check.
+     * @return {@code true} if the specified {@code PrincipalCollection} is {@code null} or
+     *         {@link PrincipalCollection#isEmpty empty}, {@code false} otherwise.
+     * @since 1.0
+     * @deprecated Use PrincipalCollection.isEmpty() directly.
+     */
+    @Deprecated
+    public static boolean isEmpty(PrincipalCollection principals) {
+        return principals == null || principals.isEmpty();
+    }
+
+    public static <E> List<E> asList(E... elements) {
+        if (elements == null || elements.length == 0) {
+            return Collections.emptyList();
+        }
+
+        // Integer overflow does not occur when a large array is passed in because the list array already exists
+        return Arrays.asList(elements);
+    }
+
+    /*public static <E> Deque<E> asDeque(E... elements) {
+        if (elements == null || elements.length == 0) {
+            return new ArrayDeque<E>();
+        }
+        // Avoid integer overflow when a large array is passed in
+        int capacity = computeListCapacity(elements.length);
+        ArrayDeque<E> deque = new ArrayDeque<E>(capacity);
+        Collections.addAll(deque, elements);
+        return deque;
+    }*/
+
+    static int computeListCapacity(int arraySize) {
+        return (int) Math.min(5L + arraySize + (arraySize / 10), Integer.MAX_VALUE);
+    }
+}

http://git-wip-us.apache.org/repos/asf/shiro/blob/d44204a4/lang/src/main/java/org/apache/shiro/util/Assert.java
----------------------------------------------------------------------
diff --git a/lang/src/main/java/org/apache/shiro/util/Assert.java b/lang/src/main/java/org/apache/shiro/util/Assert.java
index d580247..689f720 100644
--- a/lang/src/main/java/org/apache/shiro/util/Assert.java
+++ b/lang/src/main/java/org/apache/shiro/util/Assert.java
@@ -270,7 +270,7 @@ public abstract class Assert {
      * @throws IllegalArgumentException if the collection is <code>null</code> or has no elements
      */
     public static void notEmpty(Collection collection, String message) {
-        if (CollectionUtils.isEmpty(collection)) {
+        if (isEmpty(collection)) {
             throw new IllegalArgumentException(message);
         }
     }
@@ -296,7 +296,7 @@ public abstract class Assert {
      * @throws IllegalArgumentException if the map is <code>null</code> or has no entries
      */
     public static void notEmpty(Map map, String message) {
-        if (CollectionUtils.isEmpty(map)) {
+        if (isEmpty(map)) {
             throw new IllegalArgumentException(message);
         }
     }
@@ -404,4 +404,18 @@ public abstract class Assert {
         state(expression, "[Assertion failed] - this state invariant must be true");
     }
 
+
+    //////////////////////////
+    // From CollectionUtils //
+    //////////////////////////
+    // CollectionUtils cannot be removed from shiro-core until 2.0 as it has a dependency on PrincipalCollection
+
+    private static boolean isEmpty(Map m) {
+        return m == null || m.isEmpty();
+    }
+
+    private static boolean isEmpty(Collection c) {
+        return c == null || c.isEmpty();
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/shiro/blob/d44204a4/lang/src/main/java/org/apache/shiro/util/CollectionUtils.java
----------------------------------------------------------------------
diff --git a/lang/src/main/java/org/apache/shiro/util/CollectionUtils.java b/lang/src/main/java/org/apache/shiro/util/CollectionUtils.java
deleted file mode 100644
index 67e9901..0000000
--- a/lang/src/main/java/org/apache/shiro/util/CollectionUtils.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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 org.apache.shiro.util;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Static helper class for use dealing with Collections.
- *
- * @since 0.9
- */
-public class CollectionUtils {
-
-    //TODO - complete JavaDoc
-
-    public static <E> Set<E> asSet(E... elements) {
-        if (elements == null || elements.length == 0) {
-            return Collections.emptySet();
-        }
-
-        if (elements.length == 1) {
-            return Collections.singleton(elements[0]);
-        }
-
-        LinkedHashSet<E> set = new LinkedHashSet<E>(elements.length * 4 / 3 + 1);
-        Collections.addAll(set, elements);
-        return set;
-    }
-
-    /**
-     * Returns {@code true} if the specified {@code Collection} is {@code null} or {@link Collection#isEmpty empty},
-     * {@code false} otherwise.
-     *
-     * @param c the collection to check
-     * @return {@code true} if the specified {@code Collection} is {@code null} or {@link Collection#isEmpty empty},
-     *         {@code false} otherwise.
-     * @since 1.0
-     */
-    public static boolean isEmpty(Collection c) {
-        return c == null || c.isEmpty();
-    }
-
-    /**
-     * Returns {@code true} if the specified {@code Map} is {@code null} or {@link Map#isEmpty empty},
-     * {@code false} otherwise.
-     *
-     * @param m the {@code Map} to check
-     * @return {@code true} if the specified {@code Map} is {@code null} or {@link Map#isEmpty empty},
-     *         {@code false} otherwise.
-     * @since 1.0
-     */
-    public static boolean isEmpty(Map m) {
-        return m == null || m.isEmpty();
-    }
-
-    /**
-     * Returns the size of the specified collection or {@code 0} if the collection is {@code null}.
-     *
-     * @param c the collection to check
-     * @return the size of the specified collection or {@code 0} if the collection is {@code null}.
-     * @since 1.2
-     */
-    public static int size(Collection c) {
-        return c != null ? c.size() : 0;
-    }
-
-    /**
-     * Returns the size of the specified map or {@code 0} if the map is {@code null}.
-     *
-     * @param m the map to check
-     * @return the size of the specified map or {@code 0} if the map is {@code null}.
-     * @since 1.2
-     */
-    public static int size(Map m) {
-        return m != null ? m.size() : 0;
-    }
-
-
-    public static <E> List<E> asList(E... elements) {
-        if (elements == null || elements.length == 0) {
-            return Collections.emptyList();
-        }
-
-        // Integer overflow does not occur when a large array is passed in because the list array already exists
-        return Arrays.asList(elements);
-    }
-
-    /*public static <E> Deque<E> asDeque(E... elements) {
-        if (elements == null || elements.length == 0) {
-            return new ArrayDeque<E>();
-        }
-        // Avoid integer overflow when a large array is passed in
-        int capacity = computeListCapacity(elements.length);
-        ArrayDeque<E> deque = new ArrayDeque<E>(capacity);
-        Collections.addAll(deque, elements);
-        return deque;
-    }*/
-
-    static int computeListCapacity(int arraySize) {
-        return (int) Math.min(5L + arraySize + (arraySize / 10), Integer.MAX_VALUE);
-    }
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/d44204a4/lang/src/main/java/org/apache/shiro/util/StringUtils.java
----------------------------------------------------------------------
diff --git a/lang/src/main/java/org/apache/shiro/util/StringUtils.java b/lang/src/main/java/org/apache/shiro/util/StringUtils.java
index 15fd9e1..70ee06d 100644
--- a/lang/src/main/java/org/apache/shiro/util/StringUtils.java
+++ b/lang/src/main/java/org/apache/shiro/util/StringUtils.java
@@ -475,7 +475,7 @@ public class StringUtils {
             return null;
         }
         String[] split = split(delimited, separator.charAt(0));
-        return CollectionUtils.asSet(split);
+        return asSet(split);
     }
 
     /**
@@ -499,4 +499,24 @@ public class StringUtils {
         return sb.toString();
     }
 
+    //////////////////////////
+    // From CollectionUtils //
+    //////////////////////////
+    // CollectionUtils cannot be removed from shiro-core until 2.0 as it has a dependency on PrincipalCollection
+
+
+    private static <E> Set<E> asSet(E... elements) {
+        if (elements == null || elements.length == 0) {
+            return Collections.emptySet();
+        }
+
+        if (elements.length == 1) {
+            return Collections.singleton(elements[0]);
+        }
+
+        LinkedHashSet<E> set = new LinkedHashSet<E>(elements.length * 4 / 3 + 1);
+        Collections.addAll(set, elements);
+        return set;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/shiro/blob/d44204a4/support/ehcache/src/main/java/org/apache/shiro/cache/ehcache/EhCache.java
----------------------------------------------------------------------
diff --git a/support/ehcache/src/main/java/org/apache/shiro/cache/ehcache/EhCache.java b/support/ehcache/src/main/java/org/apache/shiro/cache/ehcache/EhCache.java
index 9393e74..c8a3be8 100644
--- a/support/ehcache/src/main/java/org/apache/shiro/cache/ehcache/EhCache.java
+++ b/support/ehcache/src/main/java/org/apache/shiro/cache/ehcache/EhCache.java
@@ -21,7 +21,6 @@ package org.apache.shiro.cache.ehcache;
 import net.sf.ehcache.Element;
 import org.apache.shiro.cache.Cache;
 import org.apache.shiro.cache.CacheException;
-import org.apache.shiro.util.CollectionUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -152,7 +151,7 @@ public class EhCache<K, V> implements Cache<K, V> {
         try {
             @SuppressWarnings({"unchecked"})
             List<K> keys = cache.getKeys();
-            if (!CollectionUtils.isEmpty(keys)) {
+            if (!isEmpty(keys)) {
                 return Collections.unmodifiableSet(new LinkedHashSet<K>(keys));
             } else {
                 return Collections.emptySet();
@@ -166,7 +165,7 @@ public class EhCache<K, V> implements Cache<K, V> {
         try {
             @SuppressWarnings({"unchecked"})
             List<K> keys = cache.getKeys();
-            if (!CollectionUtils.isEmpty(keys)) {
+            if (!isEmpty(keys)) {
                 List<V> values = new ArrayList<V>(keys.size());
                 for (K key : keys) {
                     V value = get(key);
@@ -238,4 +237,13 @@ public class EhCache<K, V> implements Cache<K, V> {
     public String toString() {
         return "EhCache [" + cache.getName() + "]";
     }
+
+    //////////////////////////
+    // From CollectionUtils //
+    //////////////////////////
+    // CollectionUtils cannot be removed from shiro-core until 2.0 as it has a dependency on PrincipalCollection
+
+    private static boolean isEmpty(Collection c) {
+        return c == null || c.isEmpty();
+    }
 }


[5/8] shiro git commit: removing shiro-openid4j from master until work is complete

Posted by bd...@apache.org.
removing shiro-openid4j from master until work is complete


Project: http://git-wip-us.apache.org/repos/asf/shiro/repo
Commit: http://git-wip-us.apache.org/repos/asf/shiro/commit/3a23929a
Tree: http://git-wip-us.apache.org/repos/asf/shiro/tree/3a23929a
Diff: http://git-wip-us.apache.org/repos/asf/shiro/diff/3a23929a

Branch: refs/heads/master
Commit: 3a23929a8d3d2f13ebe3365ca66f94d51b5bdbe6
Parents: 056d7cc
Author: Brian Demers <bd...@apache.org>
Authored: Mon Nov 7 15:17:10 2016 -0500
Committer: Brian Demers <bd...@apache.org>
Committed: Mon Nov 7 15:17:10 2016 -0500

----------------------------------------------------------------------
 pom.xml                                         |  10 --
 support/openid4j/pom.xml                        |  91 ----------
 .../shiro/openid4j/ConstructedRequest.java      |  33 ----
 .../shiro/openid4j/DefaultOpenIdService.java    | 148 -----------------
 .../shiro/openid4j/DiscoveryException.java      |  29 ----
 .../shiro/openid4j/DiscoveryIdResolver.java     |  27 ---
 .../shiro/openid4j/MessageExtensionFactory.java |  31 ----
 .../apache/shiro/openid4j/OpenIdException.java  |  31 ----
 .../apache/shiro/openid4j/OpenIdService.java    |  29 ----
 .../openid4j/SimpleConstructedRequest.java      |  44 -----
 .../shiro/openid4j/ax/AttributeDefinition.java  |  34 ----
 .../shiro/openid4j/ax/AttributeProperty.java    | 118 -------------
 .../shiro/openid4j/ax/FetchRequestFactory.java  | 164 -------------------
 .../openid4j/ax/SimpleAttributeDefinition.java  |  74 ---------
 .../shiro/openid4j/realm/RelyingPartyRealm.java |  57 -------
 .../groovy/AttributeTypeScreenScraper.groovy    | 100 -----------
 .../openid4j/ax/FetchRequestFactoryTest.groovy  |  47 ------
 .../src/test/resources/log4j.properties         |  37 -----
 support/pom.xml                                 |   1 -
 19 files changed, 1105 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/shiro/blob/3a23929a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 11d27bf..7051eb8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -86,7 +86,6 @@
         <hsqldb.version>1.8.0.7</hsqldb.version>
         <jdk.version>1.6</jdk.version>
         <jetty.version>9.3.0.M1</jetty.version>
-        <openid4j.version>0.9.5</openid4j.version>
         <!-- Don't change this version without also changing the shiro-quartz and shiro-features
              modules' OSGi metadata: -->
         <quartz.version>1.6.1</quartz.version>
@@ -827,15 +826,6 @@
             </dependency>
 
             <dependency>
-                <groupId>org.openid4java</groupId>
-                <artifactId>openid4java-consumer</artifactId>
-                <!--artifactId>openid4java-server</artifactId-->
-                <!--artifactId>openid4java-infocard</artifactId-->
-                <!--artifactId>openid4java-xri</artifactId-->
-                <!--artifactId>openid4java</artifactId-->
-                <version>${openid4j.version}</version>
-            </dependency>
-            <dependency>
                 <!-- Used for Atlassian Crowd Realm - not required for the framework: -->
                 <groupId>com.atlassian.crowd</groupId>
                 <artifactId>crowd-integration-client</artifactId>

http://git-wip-us.apache.org/repos/asf/shiro/blob/3a23929a/support/openid4j/pom.xml
----------------------------------------------------------------------
diff --git a/support/openid4j/pom.xml b/support/openid4j/pom.xml
deleted file mode 100644
index 44c7c01..0000000
--- a/support/openid4j/pom.xml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?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">
-
-    <parent>
-        <groupId>org.apache.shiro</groupId>
-        <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>shiro-openid4j</artifactId>
-    <name>Apache Shiro :: Support :: OpenId4J</name>
-    <packaging>bundle</packaging>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.shiro</groupId>
-            <artifactId>shiro-core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.shiro</groupId>
-            <artifactId>shiro-web</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>javax.servlet-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.openid4java</groupId>
-            <artifactId>openid4java-consumer</artifactId>
-        </dependency>
-
-        <!-- Test dependencies -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>jcl-over-slf4j</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-SymbolicName>org.apache.shiro.openid4j</Bundle-SymbolicName>
-                        <Export-Package>org.apache.shiro.openid4j*;version=${project.version}</Export-Package>
-                        <Import-Package>
-                            org.apache.shiro*;version="${shiro.osgi.importRange}",
-                            *
-                        </Import-Package>
-                    </instructions>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>

http://git-wip-us.apache.org/repos/asf/shiro/blob/3a23929a/support/openid4j/src/main/java/org/apache/shiro/openid4j/ConstructedRequest.java
----------------------------------------------------------------------
diff --git a/support/openid4j/src/main/java/org/apache/shiro/openid4j/ConstructedRequest.java b/support/openid4j/src/main/java/org/apache/shiro/openid4j/ConstructedRequest.java
deleted file mode 100644
index 4f3b7f8..0000000
--- a/support/openid4j/src/main/java/org/apache/shiro/openid4j/ConstructedRequest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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 org.apache.shiro.openid4j;
-
-import org.openid4java.discovery.DiscoveryInformation;
-import org.openid4java.message.AuthRequest;
-
-/**
- *
- * @since 1.2
- */
-public interface ConstructedRequest {
-
-    DiscoveryInformation getDiscoveryInfo();
-
-    AuthRequest getAuthenticationRequest();
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3a23929a/support/openid4j/src/main/java/org/apache/shiro/openid4j/DefaultOpenIdService.java
----------------------------------------------------------------------
diff --git a/support/openid4j/src/main/java/org/apache/shiro/openid4j/DefaultOpenIdService.java b/support/openid4j/src/main/java/org/apache/shiro/openid4j/DefaultOpenIdService.java
deleted file mode 100644
index 067e3e4..0000000
--- a/support/openid4j/src/main/java/org/apache/shiro/openid4j/DefaultOpenIdService.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * 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 org.apache.shiro.openid4j;
-
-import org.apache.shiro.util.CollectionUtils;
-import org.apache.shiro.util.StringUtils;
-import org.openid4java.OpenIDException;
-import org.openid4java.consumer.ConsumerException;
-import org.openid4java.consumer.ConsumerManager;
-import org.openid4java.discovery.DiscoveryInformation;
-import org.openid4java.message.AuthRequest;
-import org.openid4java.message.MessageException;
-import org.openid4java.message.MessageExtension;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * Default implementation of the {@link OpenIdService} interface.
- *
- * @since 1.2
- */
-public class DefaultOpenIdService implements OpenIdService {
-
-    private ConsumerManager consumerManager;
-    private DiscoveryIdResolver discoveryIdResolver;
-    private Collection<MessageExtensionFactory> messageExtensionFactories;
-
-
-    public DefaultOpenIdService() {
-        try {
-            //The ConsumerManager class is frustrating - at the time of this implementation
-            //(2011.02.18), this constructor's source code never throws a ConsumerException - probably left in
-            //place to be backwards compatible with a previous release that did throw that exception.
-            //Another failing of checked exceptions and not programming to interfaces...
-            this.consumerManager = new ConsumerManager();
-        } catch (ConsumerException e) {
-            throw new IllegalStateException(e);
-        }
-    }
-
-    public ConsumerManager getConsumerManager() {
-        return consumerManager;
-    }
-
-    public void setConsumerManager(ConsumerManager consumerManager) {
-        this.consumerManager = consumerManager;
-    }
-
-    public DiscoveryIdResolver getDiscoveryIdResolver() {
-        return discoveryIdResolver;
-    }
-
-    public void setDiscoveryIdResolver(DiscoveryIdResolver discoveryIdResolver) {
-        this.discoveryIdResolver = discoveryIdResolver;
-    }
-
-    public Collection<MessageExtensionFactory> getMessageExtensionFactories() {
-        return messageExtensionFactories;
-    }
-
-    public void setMessageExtensionFactories(Collection<MessageExtensionFactory> messageExtensionFactories) {
-        this.messageExtensionFactories = messageExtensionFactories;
-    }
-
-    public ConstructedRequest constructRequest(String providerId, String responseUrl) throws OpenIdException {
-        String discoveryId = getDiscoveryId(providerId);
-
-        DiscoveryInformation discoveryInfo = getDiscoveryInfo(discoveryId, providerId);
-
-        AuthRequest request = createRequest(discoveryInfo, responseUrl);
-
-        addExtensions(request, discoveryInfo, providerId, discoveryId);
-
-        return createConstructedRequest(request, discoveryInfo, providerId, discoveryId);
-    }
-
-    private void addExtensions(AuthRequest request, DiscoveryInformation info, String serviceId, String discoveryId) {
-        if (!CollectionUtils.isEmpty(this.messageExtensionFactories)) {
-            for( MessageExtensionFactory factory : this.messageExtensionFactories ) {
-                MessageExtension extension = factory.createMessageExtension(request, info, serviceId, discoveryId);
-                if (extension != null) {
-                    try {
-                        request.addExtension(extension);
-                    } catch (MessageException e) {
-                        String msg = "Unable to add message extension.";
-                        throw new OpenIdException(msg, e);
-                    }
-                }
-            }
-        }
-    }
-
-    protected String getDiscoveryId(String providerId) {
-        String discoveryId = providerId;
-        if (this.discoveryIdResolver != null) {
-            discoveryId = this.discoveryIdResolver.resolveDiscoveryId(providerId);
-            if (!StringUtils.hasText(discoveryId)) {
-                throw new IllegalStateException("DiscoveryIdResolver returned a null, blank or empty string.");
-            }
-        } else {
-            if (!StringUtils.hasText(providerId)) {
-                throw new IllegalArgumentException("providerId argument cannot be null, empty or blank.");
-            }
-        }
-        return discoveryId;
-    }
-
-    protected DiscoveryInformation getDiscoveryInfo(String discoveryId, String providerId) throws DiscoveryException {
-        try {
-            List discoveries = consumerManager.discover(discoveryId);
-            return consumerManager.associate(discoveries);
-        } catch (OpenIDException e) {
-            String msg = "Unable to discover OpenId Provider based on resolved discoveryId '" + discoveryId + "' " +
-                    "(specified providerId '" + providerId + "')";
-            throw new DiscoveryException(msg, e);
-        }
-    }
-
-    protected AuthRequest createRequest(DiscoveryInformation info, String responseUrl) throws OpenIdException {
-        try {
-            return consumerManager.authenticate(info, responseUrl);
-        } catch (OpenIDException e) {
-            throw new OpenIdException("Unable to create AuthRequest.", e);
-        }
-    }
-
-    protected ConstructedRequest createConstructedRequest(AuthRequest request, DiscoveryInformation info,
-                                                          String providerId, String discoveryId) {
-        return new SimpleConstructedRequest(request, info);
-    }
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3a23929a/support/openid4j/src/main/java/org/apache/shiro/openid4j/DiscoveryException.java
----------------------------------------------------------------------
diff --git a/support/openid4j/src/main/java/org/apache/shiro/openid4j/DiscoveryException.java b/support/openid4j/src/main/java/org/apache/shiro/openid4j/DiscoveryException.java
deleted file mode 100644
index c524c79..0000000
--- a/support/openid4j/src/main/java/org/apache/shiro/openid4j/DiscoveryException.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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 org.apache.shiro.openid4j;
-
-/**
- * @since 1.2
- */
-public class DiscoveryException extends OpenIdException {
-
-    public DiscoveryException(String message, Throwable cause) {
-        super(message, cause);
-    }
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3a23929a/support/openid4j/src/main/java/org/apache/shiro/openid4j/DiscoveryIdResolver.java
----------------------------------------------------------------------
diff --git a/support/openid4j/src/main/java/org/apache/shiro/openid4j/DiscoveryIdResolver.java b/support/openid4j/src/main/java/org/apache/shiro/openid4j/DiscoveryIdResolver.java
deleted file mode 100644
index dc0fa63..0000000
--- a/support/openid4j/src/main/java/org/apache/shiro/openid4j/DiscoveryIdResolver.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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 org.apache.shiro.openid4j;
-
-/**
- * @since 1.2
- */
-public interface DiscoveryIdResolver {
-
-    String resolveDiscoveryId(String id);
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3a23929a/support/openid4j/src/main/java/org/apache/shiro/openid4j/MessageExtensionFactory.java
----------------------------------------------------------------------
diff --git a/support/openid4j/src/main/java/org/apache/shiro/openid4j/MessageExtensionFactory.java b/support/openid4j/src/main/java/org/apache/shiro/openid4j/MessageExtensionFactory.java
deleted file mode 100644
index fc82298..0000000
--- a/support/openid4j/src/main/java/org/apache/shiro/openid4j/MessageExtensionFactory.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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 org.apache.shiro.openid4j;
-
-import org.openid4java.discovery.DiscoveryInformation;
-import org.openid4java.message.AuthRequest;
-import org.openid4java.message.MessageExtension;
-
-/**
- * @since 1.2
- */
-public interface MessageExtensionFactory<T extends MessageExtension> {
-
-    T createMessageExtension(AuthRequest request, DiscoveryInformation info, String serviceId, String discoveryId);
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3a23929a/support/openid4j/src/main/java/org/apache/shiro/openid4j/OpenIdException.java
----------------------------------------------------------------------
diff --git a/support/openid4j/src/main/java/org/apache/shiro/openid4j/OpenIdException.java b/support/openid4j/src/main/java/org/apache/shiro/openid4j/OpenIdException.java
deleted file mode 100644
index 8c0d704..0000000
--- a/support/openid4j/src/main/java/org/apache/shiro/openid4j/OpenIdException.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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 org.apache.shiro.openid4j;
-
-import org.apache.shiro.authc.AuthenticationException;
-
-/**
- * @since 1.2
- */
-public class OpenIdException extends AuthenticationException {
-
-    public OpenIdException(String message, Throwable cause) {
-        super(message, cause);
-    }
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3a23929a/support/openid4j/src/main/java/org/apache/shiro/openid4j/OpenIdService.java
----------------------------------------------------------------------
diff --git a/support/openid4j/src/main/java/org/apache/shiro/openid4j/OpenIdService.java b/support/openid4j/src/main/java/org/apache/shiro/openid4j/OpenIdService.java
deleted file mode 100644
index 6d7b5ac..0000000
--- a/support/openid4j/src/main/java/org/apache/shiro/openid4j/OpenIdService.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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 org.apache.shiro.openid4j;
-
-/**
- * @since 1.2
- */
-public interface OpenIdService {
-
-    ConstructedRequest constructRequest(String providerId, String responseUrl) throws OpenIdException;
-
-
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3a23929a/support/openid4j/src/main/java/org/apache/shiro/openid4j/SimpleConstructedRequest.java
----------------------------------------------------------------------
diff --git a/support/openid4j/src/main/java/org/apache/shiro/openid4j/SimpleConstructedRequest.java b/support/openid4j/src/main/java/org/apache/shiro/openid4j/SimpleConstructedRequest.java
deleted file mode 100644
index d2fda21..0000000
--- a/support/openid4j/src/main/java/org/apache/shiro/openid4j/SimpleConstructedRequest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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 org.apache.shiro.openid4j;
-
-import org.openid4java.discovery.DiscoveryInformation;
-import org.openid4java.message.AuthRequest;
-
-/**
- * @since 1.2
- */
-public class SimpleConstructedRequest implements ConstructedRequest {
-
-    private final DiscoveryInformation discoveryInfo;
-    private final AuthRequest authenticationRequest;
-
-    public SimpleConstructedRequest(AuthRequest authRequest, DiscoveryInformation info) {
-        this.authenticationRequest = authRequest;
-        this.discoveryInfo = info;
-    }
-
-    public DiscoveryInformation getDiscoveryInfo() {
-        return discoveryInfo;
-    }
-
-    public AuthRequest getAuthenticationRequest() {
-        return authenticationRequest;
-    }
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3a23929a/support/openid4j/src/main/java/org/apache/shiro/openid4j/ax/AttributeDefinition.java
----------------------------------------------------------------------
diff --git a/support/openid4j/src/main/java/org/apache/shiro/openid4j/ax/AttributeDefinition.java b/support/openid4j/src/main/java/org/apache/shiro/openid4j/ax/AttributeDefinition.java
deleted file mode 100644
index 787c56e..0000000
--- a/support/openid4j/src/main/java/org/apache/shiro/openid4j/ax/AttributeDefinition.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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 org.apache.shiro.openid4j.ax;
-
-/**
- * @since 1.2
- */
-public interface AttributeDefinition {
-
-    String getName();
-
-    String getUri();
-
-    boolean isRequired();
-
-    int getCount();
-
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3a23929a/support/openid4j/src/main/java/org/apache/shiro/openid4j/ax/AttributeProperty.java
----------------------------------------------------------------------
diff --git a/support/openid4j/src/main/java/org/apache/shiro/openid4j/ax/AttributeProperty.java b/support/openid4j/src/main/java/org/apache/shiro/openid4j/ax/AttributeProperty.java
deleted file mode 100644
index 8f7714b..0000000
--- a/support/openid4j/src/main/java/org/apache/shiro/openid4j/ax/AttributeProperty.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * 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 org.apache.shiro.openid4j.ax;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * An Enum representing all de-facto standard <a href="http://www.axschema.org/types/">
- * Attribute Exchange Types</a>.
- *
- * @since 1.2
- */
-public enum AttributeProperty {
-
-    Username("http://axschema.org/namePerson/friendly", "Alias/Username"),
-    FullName("http://axschema.org/namePerson", "Full name"),
-    NamePrefix("http://axschema.org/namePerson/prefix", "Name prefix"),
-    FirstName("http://axschema.org/namePerson/first", "First name"),
-    LastName("http://axschema.org/namePerson/last", "Last name"),
-    MiddleName("http://axschema.org/namePerson/middle", "Middle name"),
-    NameSuffix("http://axschema.org/namePerson/suffix", "Name suffix"),
-    CompanyName("http://axschema.org/company/name", "Company name"),
-    JobTitle("http://axschema.org/company/title", "Job title"),
-    BirthDate("http://axschema.org/birthDate", "Birth date"),
-    BirthYear("http://axschema.org/birthDate/birthYear", "Birth year"),
-    BirthMonth("http://axschema.org/birthDate/birthMonth", "Birth month"),
-    BirthDay("http://axschema.org/birthDate/birthday", "Birth day"),
-    PhonePreferred("http://axschema.org/contact/phone/default", "Phone (preferred)"),
-    PhoneHome("http://axschema.org/contact/phone/home", "Phone (home)"),
-    PhoneWork("http://axschema.org/contact/phone/business", "Phone (work)"),
-    PhoneMobile("http://axschema.org/contact/phone/cell", "Phone (mobile)"),
-    PhoneFax("http://axschema.org/contact/phone/fax", "Phone (fax)"),
-    Address("http://axschema.org/contact/postalAddress/home", "Address"),
-    Address2("http://axschema.org/contact/postalAddressAdditional/home", "Address 2"),
-    City("http://axschema.org/contact/city/home", "City"),
-    State("http://axschema.org/contact/state/home", "State/Province"),
-    Country("http://axschema.org/contact/country/home", "Country"),
-    PostalCode("http://axschema.org/contact/postalCode/home", "Postal code"),
-    BusinessAddress("http://axschema.org/contact/postalAddress/business", "Address"),
-    BusinessAddress2("http://axschema.org/contact/postalAddressAdditional/business", "Address 2"),
-    BusinessCity("http://axschema.org/contact/city/business", "City"),
-    BusinessState("http://axschema.org/contact/state/business", "State/Province"),
-    BusinessCountry("http://axschema.org/contact/country/business", "Country"),
-    BusinessPostalCode("http://axschema.org/contact/postalCode/business", "Postal code"),
-    Email("http://axschema.org/contact/email", "Email"),
-    AOLIM("http://axschema.org/contact/IM/AIM", "AOL IM"),
-    ICQIM("http://axschema.org/contact/IM/ICQ", "ICQ IM"),
-    MSNIM("http://axschema.org/contact/IM/MSN", "MSN IM"),
-    YahooIM("http://axschema.org/contact/IM/Yahoo", "Yahoo! IM"),
-    JabberIM("http://axschema.org/contact/IM/Jabber", "Jabber IM"),
-    SkypeIM("http://axschema.org/contact/IM/Skype", "Skype IM"),
-    WebPage("http://axschema.org/contact/web/default", "Web page"),
-    Blog("http://axschema.org/contact/web/blog", "Blog"),
-    LinkedInURL("http://axschema.org/contact/web/Linkedin", "LinkedIn URL"),
-    AmazonURL("http://axschema.org/contact/web/Amazon", "Amazon URL"),
-    FlickrURL("http://axschema.org/contact/web/Flickr", "Flickr URL"),
-    DeliciousURL("http://axschema.org/contact/web/Delicious", "del.icio.us URL"),
-    SpokenName("http://axschema.org/media/spokenname", "Spoken name"),
-    AudioGreeting("http://axschema.org/media/greeting/audio", "Audio greeting"),
-    VideoGreeting("http://axschema.org/media/greeting/video", "Video greeting"),
-    Image("http://axschema.org/media/image/default", "Image"),
-    SquareImage("http://axschema.org/media/image/aspect11", "Square image"),
-    Aspect43Image("http://axschema.org/media/image/aspect43", "4:3 aspect image"),
-    Aspect34Image("http://axschema.org/media/image/aspect34", "3:4 aspect image"),
-    FaviconImage("http://axschema.org/media/image/favicon", "Favicon image"),
-    Gender("http://axschema.org/person/gender", "Gender"),
-    Language("http://axschema.org/pref/language", "Language"),
-    TimeZone("http://axschema.org/pref/timezone", "Time zone");
-
-    private static final Map<String, AttributeProperty> caseInsensitiveNameMap;
-
-    static {
-        caseInsensitiveNameMap = new HashMap<String, AttributeProperty>();
-        for (AttributeProperty prop : values()) {
-            caseInsensitiveNameMap.put(prop.name().toLowerCase(), prop);
-        }
-    }
-
-    private final String label;
-    private final String uri;
-
-    private AttributeProperty(String uri, String label) {
-        this.uri = uri;
-        this.label = label;
-    }
-
-    public static AttributeProperty fromName(String caseInsensitiveName) {
-        if (caseInsensitiveName == null) {
-            return null;
-        }
-        return caseInsensitiveNameMap.get(caseInsensitiveName.toLowerCase());
-    }
-
-    public String getLabel() {
-        return label;
-    }
-
-    public String getUri() {
-        return uri;
-    }
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3a23929a/support/openid4j/src/main/java/org/apache/shiro/openid4j/ax/FetchRequestFactory.java
----------------------------------------------------------------------
diff --git a/support/openid4j/src/main/java/org/apache/shiro/openid4j/ax/FetchRequestFactory.java b/support/openid4j/src/main/java/org/apache/shiro/openid4j/ax/FetchRequestFactory.java
deleted file mode 100644
index 499119a..0000000
--- a/support/openid4j/src/main/java/org/apache/shiro/openid4j/ax/FetchRequestFactory.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * 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 org.apache.shiro.openid4j.ax;
-
-import org.apache.shiro.config.ConfigurationException;
-import org.apache.shiro.openid4j.MessageExtensionFactory;
-import org.apache.shiro.openid4j.OpenIdException;
-import org.apache.shiro.util.StringUtils;
-import org.openid4java.discovery.DiscoveryInformation;
-import org.openid4java.message.AuthRequest;
-import org.openid4java.message.MessageException;
-import org.openid4java.message.ax.FetchRequest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @since 1.2
- */
-public class FetchRequestFactory implements MessageExtensionFactory<FetchRequest> {
-
-    private static final Logger log = LoggerFactory.getLogger(FetchRequestFactory.class);
-
-    private Map<String, String> providerAttributes;
-
-    public FetchRequestFactory() {
-        this.providerAttributes = new HashMap<String,String>();
-    }
-
-    public Map<String, String> getProviderAttributes() {
-        return providerAttributes;
-    }
-
-    public void setProviderAttributes(Map<String, String> providerAttributes) {
-        this.providerAttributes = providerAttributes;
-    }
-
-    public FetchRequest createMessageExtension(AuthRequest request, DiscoveryInformation info, String serviceId, String discoveryId) {
-
-        String definition = providerAttributes.get(serviceId);
-        if (definition == null) {
-            definition = providerAttributes.get(discoveryId);
-        }
-        if (definition == null) {
-            return null;
-        }
-
-        String[] attributes = StringUtils.split(definition);
-        if (attributes == null || attributes.length == 0) {
-            return null;
-        }
-
-        FetchRequest fetch = FetchRequest.createFetchRequest();
-
-        //parse the definition by tokenizing it to get the resulting attribute-specific config
-        //
-        //e.g. for a value of
-        //
-        //     "email, firstName[required=true], lastName"
-        //
-        // the resulting token array would equal
-        //
-        //     { "email", "firstName[required=true]", "lastName" }
-        //
-        for (String attribute : attributes) {
-            //strip the name and extract any attribute-specific config between brackets [ ]
-            String[] nameAndConfig = attribute.split("\\[", 2);
-            String name = nameAndConfig[0];
-            String config = null;
-
-            if (nameAndConfig.length == 2) {
-                config = nameAndConfig[1];
-                //if there was an open bracket, there was a close bracket, so strip it too:
-                config = config.substring(0, config.length() - 1);
-            }
-
-            AttributeDefinition ad = toDefinition(name, config);
-
-            try {
-                fetch.addAttribute(ad.getName(), ad.getUri(), ad.isRequired(), ad.getCount());
-            } catch (MessageException e) {
-                throw new OpenIdException("Unable to correctly add 'fetch' attribute.", e);
-            }
-        }
-
-        return fetch;
-    }
-
-    protected AttributeDefinition toDefinition(String name, String config) {
-
-        AttributeProperty prop = AttributeProperty.fromName(name);
-        if (prop == null) {
-            throw new ConfigurationException("Unable to locate a standard OpenId Attribute property for name '" +
-                    name + "'.  Please ensure this name matches one of the constants in the " +
-                    AttributeProperty.class.getName() + " enum (name matching is case insensitive).");
-        }
-
-        String uri = prop.getUri();
-        boolean required = false;
-        int count = 0;
-
-
-        if (config != null) {
-            String[] configPairs = StringUtils.split(config);
-            for (String pair : configPairs) {
-                String nameValue[] = pair.split("\\=", 2);
-                if (nameValue.length != 2) {
-                    throw new ConfigurationException("OpenId attribute properties with configuration must be " +
-                            "comma-delimited name/value pairs.  Each name/value pair must be separated by the " +
-                            "equals sign, e.g. nameProp[name1=value1, name2=value2, ...].   The string that " +
-                            "caused this error was '" + pair + "'.");
-                }
-                String pairName = nameValue[0];
-                String pairValue = nameValue[1];
-
-                if ("uri".equalsIgnoreCase(pairName)) {
-                    uri = pairValue;
-                } else if ("required".equalsIgnoreCase(pairName)) {
-                    required = Boolean.valueOf(pairValue);
-                } else if ("count".equalsIgnoreCase(pairName)) {
-                    try {
-                        count = Integer.parseInt(pairValue);
-                    } catch (NumberFormatException e) {
-                        String msg = "Unable to correctly parse 'count' value '" + pairValue + "' for OpenId " +
-                                "attribute '" + name + "'";
-                        throw new ConfigurationException(msg, e);
-                    }
-                    if (count < 0) {
-                        count = 0;
-                    }
-                } else {
-                    if (log.isWarnEnabled()) {
-                        log.warn("Unrecognized configuration name/value pair for OpenId attribute '{}': {}={}",
-                                new Object[]{name, pairName, pairValue});
-                    }
-
-                }
-            }
-        }
-
-
-        return new SimpleAttributeDefinition(prop.name(), uri, required, count);
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3a23929a/support/openid4j/src/main/java/org/apache/shiro/openid4j/ax/SimpleAttributeDefinition.java
----------------------------------------------------------------------
diff --git a/support/openid4j/src/main/java/org/apache/shiro/openid4j/ax/SimpleAttributeDefinition.java b/support/openid4j/src/main/java/org/apache/shiro/openid4j/ax/SimpleAttributeDefinition.java
deleted file mode 100644
index bd7de70..0000000
--- a/support/openid4j/src/main/java/org/apache/shiro/openid4j/ax/SimpleAttributeDefinition.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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 org.apache.shiro.openid4j.ax;
-
-import org.apache.shiro.openid4j.ax.AttributeDefinition;
-
-/**
- * @since 1.2
- */
-public class SimpleAttributeDefinition implements AttributeDefinition {
-
-    private String name;
-    private String uri;
-    private boolean required;
-    private int count;
-
-    public SimpleAttributeDefinition() {
-    }
-
-    public SimpleAttributeDefinition(String name, String uri, boolean required, int count) {
-        this.name = name;
-        this.uri = uri;
-        this.required = required;
-        this.count = count;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getUri() {
-        return uri;
-    }
-
-    public void setUri(String uri) {
-        this.uri = uri;
-    }
-
-    public boolean isRequired() {
-        return required;
-    }
-
-    public void setRequired(boolean required) {
-        this.required = required;
-    }
-
-    public int getCount() {
-        return count;
-    }
-
-    public void setCount(int count) {
-        this.count = count;
-    }
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3a23929a/support/openid4j/src/main/java/org/apache/shiro/openid4j/realm/RelyingPartyRealm.java
----------------------------------------------------------------------
diff --git a/support/openid4j/src/main/java/org/apache/shiro/openid4j/realm/RelyingPartyRealm.java b/support/openid4j/src/main/java/org/apache/shiro/openid4j/realm/RelyingPartyRealm.java
deleted file mode 100644
index 8f65006..0000000
--- a/support/openid4j/src/main/java/org/apache/shiro/openid4j/realm/RelyingPartyRealm.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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 org.apache.shiro.openid4j.realm;
-
-import org.apache.shiro.authc.AuthenticationException;
-import org.apache.shiro.authc.AuthenticationInfo;
-import org.apache.shiro.authc.AuthenticationToken;
-import org.apache.shiro.openid4j.OpenIdService;
-import org.apache.shiro.realm.AuthenticatingRealm;
-
-/**
- * A {@code Realm} implementation that performs OpenID authentication by acting as the &quot;Relying Party&quot;
- * (client) to an OpenId Provider (server).
- *
- * @since 1.2
- */
-public class RelyingPartyRealm extends AuthenticatingRealm {
-
-    private OpenIdService openIdService;
-
-    public RelyingPartyRealm() {
-
-    }
-
-    public OpenIdService getOpenIdService() {
-        return openIdService;
-    }
-
-    public void setOpenIdService(OpenIdService openIdService) {
-        this.openIdService = openIdService;
-    }
-
-    @Override
-    protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException {
-
-        //TODO
-
-        return null;
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3a23929a/support/openid4j/src/test/groovy/AttributeTypeScreenScraper.groovy
----------------------------------------------------------------------
diff --git a/support/openid4j/src/test/groovy/AttributeTypeScreenScraper.groovy b/support/openid4j/src/test/groovy/AttributeTypeScreenScraper.groovy
deleted file mode 100644
index d11a8bc..0000000
--- a/support/openid4j/src/test/groovy/AttributeTypeScreenScraper.groovy
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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.
- */
-
-/**
- * @since 1.2
- */
-class AttributeTypeScreenScraper extends GroovyTestCase {
-
-    void testNothing() {}
-
-    //used to generate constants in the AttributeProperty class:
-    void doTestScrape() {
-
-        //file copied from the OpenId website:
-        def resource = "http://www.axschema.org/types/";
-
-        def properties = []
-        def property = [:]
-
-        boolean parsing = false;
-
-        resource.toURL().eachLine("UTF-8", { String line ->
-
-            line = line.trim()
-
-            if (line.equals("<table id=\"types\">")) {
-                parsing = true;
-            }
-            if (parsing && line.equals("</table>")) {
-                parsing = false
-            }
-            if (parsing) {
-                if (line.equals("<tr>") && property.size() == 3) {
-                    properties << property
-                    property = [:]
-                }
-                if (line.startsWith("<td") && line.endsWith("</a></td>")) {
-                    int index = line.lastIndexOf("http://");
-                    line = line.substring(index, line.length() - "</a></td>".length())
-                    property.uri = line
-                } else if (line.startsWith("<td>") && line.endsWith("</td>") && !line.contains("&nbsp;")) {
-                    line = line.substring(4, line.length() - 5)
-                    property.label = line
-
-                    String[] words = property.label.split(" ");
-                    String varName = "";
-                    for( String s : words ) {
-                        s = s.replace("(", "")
-                        s = s.replace(")", "")
-                        s = s.replace(".", "")
-                        int index = s.indexOf("/")
-                        if (index > 0) {
-                            s = s.substring(0, index)
-                        }
-                        varName += s.capitalize()
-                    }
-
-                    //special cases:
-                    if (property.uri.endsWith("business")) {
-                        varName = "Business" + varName;
-                    }
-                    if (varName == "Alias") {
-                        varName = "Username"
-                    }
-                    if (varName == "Yahoo!IM") {
-                        varName = "YahooIM"
-                    }
-                    if (varName == "4:3AspectImage") {
-                        varName = "Aspect43Image"
-                    }
-                    if (varName == "3:4AspectImage") {
-                        varName = "Aspect34Image"
-                    }
-                    property.name = varName;
-                }
-            }
-        });
-        for (def prop: properties) {
-            String d = "${prop.name}(\"${prop.uri}\", \"${prop.label}\"), ";
-            System.out.println(d);
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3a23929a/support/openid4j/src/test/groovy/org/apache/shiro/openid4j/ax/FetchRequestFactoryTest.groovy
----------------------------------------------------------------------
diff --git a/support/openid4j/src/test/groovy/org/apache/shiro/openid4j/ax/FetchRequestFactoryTest.groovy b/support/openid4j/src/test/groovy/org/apache/shiro/openid4j/ax/FetchRequestFactoryTest.groovy
deleted file mode 100644
index 7d72fc4..0000000
--- a/support/openid4j/src/test/groovy/org/apache/shiro/openid4j/ax/FetchRequestFactoryTest.groovy
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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 org.apache.shiro.openid4j.ax
-
-import org.openid4java.message.ax.FetchRequest
-
-/**
- * Created by IntelliJ IDEA.
- * User: lhazlewood
- * Date: 2/21/11
- * Time: 10:04 PM
- * To change this template use File | Settings | File Templates.
- */
-class FetchRequestFactoryTest extends GroovyTestCase {
-
-    void testCreateWithProviderAttributes() {
-
-        FetchRequestFactory factory = new FetchRequestFactory();
-
-        factory.providerAttributes.google = "email[count=1], firstName[required=true], lastName"
-
-        FetchRequest request = factory.createMessageExtension(null, null, "google", null);
-
-        assertNotNull request
-        def list = request.getParameters();
-        System.out.println(list);
-
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3a23929a/support/openid4j/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/support/openid4j/src/test/resources/log4j.properties b/support/openid4j/src/test/resources/log4j.properties
deleted file mode 100644
index 0d51520..0000000
--- a/support/openid4j/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# 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.
-#
-
-log4j.rootLogger=TRACE, stdout
-
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m %n
-
-# Pattern to output: date priority [category] - message
-log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
-log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n
-
-# Spring logging level is WARN
-log4j.logger.net.sf.ehcache=INFO
-
-# General Apache libraries is WARN
-log4j.logger.org.apache=WARN
-
-log4j.logger.org.apache.shiro=TRACE
-log4j.logger.org.apache.shiro.util.ThreadContext=WARN
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/shiro/blob/3a23929a/support/pom.xml
----------------------------------------------------------------------
diff --git a/support/pom.xml b/support/pom.xml
index fd7f801..8886f02 100644
--- a/support/pom.xml
+++ b/support/pom.xml
@@ -38,7 +38,6 @@
         <module>quartz</module>
         <module>spring</module>
         <module>guice</module>
-        <module>openid4j</module>
         <module>features</module>
         <module>cas</module>
         <module>spring-boot</module>


[2/8] shiro git commit: Moving master back to 1.4 version

Posted by bd...@apache.org.
Moving master back to 1.4 version


Project: http://git-wip-us.apache.org/repos/asf/shiro/repo
Commit: http://git-wip-us.apache.org/repos/asf/shiro/commit/53f1f6da
Tree: http://git-wip-us.apache.org/repos/asf/shiro/tree/53f1f6da
Diff: http://git-wip-us.apache.org/repos/asf/shiro/diff/53f1f6da

Branch: refs/heads/master
Commit: 53f1f6da024d283d778f1c253bbd8fc85306dd5d
Parents: 6eb070f
Author: Brian Demers <bd...@apache.org>
Authored: Mon Nov 7 15:11:43 2016 -0500
Committer: Brian Demers <bd...@apache.org>
Committed: Mon Nov 7 15:11:43 2016 -0500

----------------------------------------------------------------------
 all/pom.xml                                     |  4 +-
 cache/pom.xml                                   |  2 +-
 config/core/pom.xml                             | 25 ++++-
 config/ogdl/pom.xml                             | 19 +++-
 config/pom.xml                                  |  2 +-
 core/pom.xml                                    |  9 +-
 crypto/cipher/pom.xml                           | 24 ++++-
 crypto/core/pom.xml                             | 24 ++++-
 crypto/hash/pom.xml                             |  2 +-
 crypto/pom.xml                                  |  2 +-
 event/pom.xml                                   |  2 +-
 integration-tests/guice3/pom.xml                |  2 +-
 integration-tests/guice4/pom.xml                |  2 +-
 integration-tests/pom.xml                       |  2 +-
 integration-tests/support/pom.xml               |  2 +-
 lang/pom.xml                                    | 26 +++++-
 pom.xml                                         | 97 +++++++++++---------
 samples/aspectj/pom.xml                         |  2 +-
 samples/guice/pom.xml                           |  2 +-
 samples/jaxrs/pom.xml                           |  2 +-
 samples/pom.xml                                 |  2 +-
 samples/quickstart-guice/pom.xml                |  2 +-
 samples/quickstart/pom.xml                      |  2 +-
 samples/servlet-plugin/pom.xml                  |  2 +-
 samples/spring-boot-web/pom.xml                 |  2 +-
 samples/spring-client/pom.xml                   |  2 +-
 samples/spring-hibernate/pom.xml                |  2 +-
 samples/spring/pom.xml                          |  2 +-
 samples/web/pom.xml                             |  2 +-
 support/aspectj/pom.xml                         |  2 +-
 support/ehcache/pom.xml                         |  2 +-
 support/features/pom.xml                        |  2 +-
 support/guice/pom.xml                           |  2 +-
 support/hazelcast/pom.xml                       |  2 +-
 support/jaxrs/pom.xml                           |  2 +-
 support/pom.xml                                 |  2 +-
 support/quartz/pom.xml                          |  2 +-
 support/servlet-plugin/pom.xml                  |  2 +-
 support/spring-boot/pom.xml                     |  2 +-
 support/spring-boot/spring-boot-starter/pom.xml |  2 +-
 .../spring-boot/spring-boot-web-starter/pom.xml |  2 +-
 support/spring/pom.xml                          |  2 +-
 test-coverage/pom.xml                           |  2 +-
 tools/hasher/pom.xml                            |  2 +-
 tools/pom.xml                                   |  2 +-
 web/pom.xml                                     |  2 +-
 46 files changed, 207 insertions(+), 97 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/all/pom.xml
----------------------------------------------------------------------
diff --git a/all/pom.xml b/all/pom.xml
index cde82cc..7fa265a 100644
--- a/all/pom.xml
+++ b/all/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
@@ -103,7 +103,7 @@
         <plugins>
             <plugin>
                 <artifactId>maven-assembly-plugin</artifactId>
-                <!-- <version>2.4</version> -->
+                 <version>2.6</version>
                 <configuration>
                     <descriptors>
                         <descriptor>src/main/assembly/assembly.xml</descriptor>

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/cache/pom.xml
----------------------------------------------------------------------
diff --git a/cache/pom.xml b/cache/pom.xml
index f7e815f..0e15cd4 100644
--- a/cache/pom.xml
+++ b/cache/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/config/core/pom.xml
----------------------------------------------------------------------
diff --git a/config/core/pom.xml b/config/core/pom.xml
index 5d5e003..2c6fd25 100644
--- a/config/core/pom.xml
+++ b/config/core/pom.xml
@@ -22,14 +22,35 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
     <artifactId>shiro-config-core</artifactId>
     <name>Apache Shiro :: Configuration :: Core</name>
-    <packaging>jar</packaging>
+
+    <packaging>bundle</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>org.apache.shiro.config.core</Bundle-SymbolicName>
+                        <Export-Package>org.apache.shiro.config*;version=${project.version}</Export-Package>
+                        <Import-Package>
+                            org.apache.shiro*;version="${shiro.osgi.importRange}",
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/config/ogdl/pom.xml
----------------------------------------------------------------------
diff --git a/config/ogdl/pom.xml b/config/ogdl/pom.xml
index cdfa47e..9db98a9 100644
--- a/config/ogdl/pom.xml
+++ b/config/ogdl/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
@@ -31,7 +31,7 @@
     <name>Apache Shiro :: Configuration :: OGDL</name>
     <description>Support for Shiro's Object Graph Definition Language (mostly used in Ini configuration) where
         declared name/value pairs are interpreted to create an object graph</description>
-    <packaging>jar</packaging>
+    <packaging>bundle</packaging>
 
     <build>
         <plugins>
@@ -47,6 +47,21 @@
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>org.apache.shiro.config.core</Bundle-SymbolicName>
+                        <Export-Package>org.apache.shiro.config*;version=${project.version}</Export-Package>
+                        <Import-Package>
+                            org.apache.shiro*;version="${shiro.osgi.importRange}",
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/config/pom.xml
----------------------------------------------------------------------
diff --git a/config/pom.xml b/config/pom.xml
index d4b81e5..6bf1451 100644
--- a/config/pom.xml
+++ b/config/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index 0fa72b7..a9343c5 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -22,14 +22,14 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
     <artifactId>shiro-core</artifactId>
     <name>Apache Shiro :: Core</name>
-    <packaging>jar</packaging>
+    <packaging>bundle</packaging>
 
     <build>
         <plugins>
@@ -45,7 +45,7 @@
                     </execution>
                 </executions>
             </plugin>
-            <!-- <plugin>
+            <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
                 <extensions>true</extensions>
@@ -55,11 +55,12 @@
                         <Export-Package>org.apache.shiro*;version=${project.version}</Export-Package>
                         <Import-Package>
                             org.apache.shiro*;version="${shiro.osgi.importRange}",
+                            org.apache.commons.beanutils*;resolution:=optional,
                             *
                         </Import-Package>
                     </instructions>
                 </configuration>
-            </plugin> -->
+            </plugin>
         </plugins>
     </build>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/crypto/cipher/pom.xml
----------------------------------------------------------------------
diff --git a/crypto/cipher/pom.xml b/crypto/cipher/pom.xml
index 89e1d9a..b6b7800 100644
--- a/crypto/cipher/pom.xml
+++ b/crypto/cipher/pom.xml
@@ -22,14 +22,34 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
     <artifactId>shiro-crypto-cipher</artifactId>
     <name>Apache Shiro :: Cryptography :: Ciphers</name>
-    <packaging>jar</packaging>
+    <packaging>bundle</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>org.apache.shiro.crypto.cipher</Bundle-SymbolicName>
+                        <Export-Package>org.apache.shiro.crypto.*;version=${project.version}</Export-Package>
+                        <Import-Package>
+                            org.apache.shiro.crypto**;version="${shiro.osgi.importRange}",
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/crypto/core/pom.xml
----------------------------------------------------------------------
diff --git a/crypto/core/pom.xml b/crypto/core/pom.xml
index 700430d..4adbe7f 100644
--- a/crypto/core/pom.xml
+++ b/crypto/core/pom.xml
@@ -22,14 +22,34 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
     <artifactId>shiro-crypto-core</artifactId>
     <name>Apache Shiro :: Cryptography :: Core</name>
-    <packaging>jar</packaging>
+    <packaging>bundle</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>org.apache.shiro.crypto.core</Bundle-SymbolicName>
+                        <Export-Package>org.apache.shiro.crypto*;version=${project.version}</Export-Package>
+                        <Import-Package>
+                            org.apache.shiro.crypto*;version="${shiro.osgi.importRange}",
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/crypto/hash/pom.xml
----------------------------------------------------------------------
diff --git a/crypto/hash/pom.xml b/crypto/hash/pom.xml
index 26b7b99..5f61175 100644
--- a/crypto/hash/pom.xml
+++ b/crypto/hash/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/crypto/pom.xml
----------------------------------------------------------------------
diff --git a/crypto/pom.xml b/crypto/pom.xml
index ca83cf3..7908fb0 100644
--- a/crypto/pom.xml
+++ b/crypto/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/event/pom.xml
----------------------------------------------------------------------
diff --git a/event/pom.xml b/event/pom.xml
index 3bca375..6077699 100644
--- a/event/pom.xml
+++ b/event/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/integration-tests/guice3/pom.xml
----------------------------------------------------------------------
diff --git a/integration-tests/guice3/pom.xml b/integration-tests/guice3/pom.xml
index 1d4d5b8..5139cef 100644
--- a/integration-tests/guice3/pom.xml
+++ b/integration-tests/guice3/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.shiro.integrationtests</groupId>
 		<artifactId>shiro-integration-tests</artifactId>
-		<version>2.alpha.0-SNAPSHOT</version>
+		<version>1.4.0-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>shiro-its-guice3</artifactId>

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/integration-tests/guice4/pom.xml
----------------------------------------------------------------------
diff --git a/integration-tests/guice4/pom.xml b/integration-tests/guice4/pom.xml
index be7d85f..0abad4f 100644
--- a/integration-tests/guice4/pom.xml
+++ b/integration-tests/guice4/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.shiro.integrationtests</groupId>
 		<artifactId>shiro-integration-tests</artifactId>
-		<version>2.alpha.0-SNAPSHOT</version>
+		<version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/integration-tests/pom.xml
----------------------------------------------------------------------
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index 82dede2..2f94436 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.apache.shiro.integrationtests</groupId>

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/integration-tests/support/pom.xml
----------------------------------------------------------------------
diff --git a/integration-tests/support/pom.xml b/integration-tests/support/pom.xml
index 3ab1244..13901fe 100644
--- a/integration-tests/support/pom.xml
+++ b/integration-tests/support/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.shiro.integrationtests</groupId>
 		<artifactId>shiro-integration-tests</artifactId>
-		<version>2.alpha.0-SNAPSHOT</version>
+		<version>1.4.0-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>shiro-its-support</artifactId>

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/lang/pom.xml
----------------------------------------------------------------------
diff --git a/lang/pom.xml b/lang/pom.xml
index 87f071b..2f27ee8 100644
--- a/lang/pom.xml
+++ b/lang/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
@@ -34,7 +34,7 @@
         The lang module encapsulates only language-specific utilities that are used by various
         other modules.  It exists to augment what we would have liked to see in the JDK but does not exist.
     </description>
-    <packaging>jar</packaging>
+    <packaging>bundle</packaging>
 
     <dependencies>
 
@@ -53,4 +53,26 @@
         </dependency>
     </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>org.apache.shiro.lang</Bundle-SymbolicName>
+                        <Export-Package>org.apache.shiro.*;version=${project.version}</Export-Package>
+                        <!-- javax.servlet.jsp* marked as optional per SHIRO-390: -->
+                        <Import-Package>
+                            org.apache.shiro*;version="${shiro.osgi.importRange}",
+                            javax.servlet.jsp*;resolution:=optional,
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
 </project>

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 03dc937..11d27bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@
     <groupId>org.apache.shiro</groupId>
     <artifactId>shiro-root</artifactId>
     <packaging>pom</packaging>
-    <version>2.alpha.0-SNAPSHOT</version>
+    <version>1.4.0-SNAPSHOT</version>
 
     <name>Apache Shiro</name>
     <url>http://shiro.apache.org/</url>
@@ -69,7 +69,7 @@
         <buildNumber>${user.name}-${maven.build.timestamp}</buildNumber>
 
         <!-- non-dependency-based properties: -->
-        <shiro.osgi.importRange>[2, 3)</shiro.osgi.importRange>
+        <shiro.osgi.importRange>[1.2, 2)</shiro.osgi.importRange>
 
         <!-- Compile 3rd party dependencies: -->
         <!-- Don't change this version without also changing the shiro-aspect and shiro-features
@@ -236,14 +236,12 @@
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-site-plugin</artifactId>
-                    <version>3.5</version>
-                    <dependencies>
-                        <dependency>
-                            <groupId>org.apache.maven.wagon</groupId>
-                            <artifactId>wagon-ssh</artifactId>
-                            <version>2.2</version>
-                        </dependency>
-                    </dependencies>
+                    <version>3.5.1</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-scm-publish-plugin</artifactId>
+                    <version>1.0</version>
                 </plugin>
                 <plugin>
                     <groupId>org.apache.rat</groupId>
@@ -568,18 +566,31 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-release-plugin</artifactId>
-                <version>2.3.2</version>
+                <version>2.5.1</version>
                 <configuration>
+                    <!-- do not update upstream, with a pending release. -->
+                    <pushChanges>false</pushChanges>
+                    <localCheckout>true</localCheckout>
                     <!-- "install" needed because we have interrelated dependencies between the modules and we are releasing them all the same - especially consider shiro-all -->
-                    <preparationGoals>clean apache-rat:rat install</preparationGoals>
+                    <preparationGoals>clean apache-rat:check install</preparationGoals>
                     <autoVersionSubmodules>true</autoVersionSubmodules>
                     <!-- This configuration copied from apache:apache:7 parent pom -->
                     <useReleaseProfile>false</useReleaseProfile>
-                    <goals>deploy site-deploy</goals>
+                    <goals>deploy site site:stage</goals>
                     <arguments>-Pdocs,apache-release</arguments>
                     <mavenExecutorId>forked-path</mavenExecutorId>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.sonatype.plugins</groupId>
+                <artifactId>nexus-staging-maven-plugin</artifactId>
+                <version>1.6.7</version>
+                <extensions>true</extensions>
+                <configuration>
+                    <nexusUrl>https://repository.apache.org</nexusUrl>
+                    <serverId>apache.releases.https</serverId>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 
@@ -632,121 +643,121 @@
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-lang</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-cache</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-core</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-config-core</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-config-ogdl</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-crypto-core</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-crypto-hash</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-crypto-cipher</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-event</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-web</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-servlet-plugin</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
 
             <!-- Shiro 3rd party support (keep this alphabetically ordered based on the artifactId please): -->
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-aspectj</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro</groupId>
-                <artifactId>shiro-ehcache</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <artifactId>shiro-cas</artifactId>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro</groupId>
-                <artifactId>shiro-faces</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <artifactId>shiro-ehcache</artifactId>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-quartz</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-spring</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-guice</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-hazelcast</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-jaxrs</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-all</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
 
             <!-- Shiro samples: -->
             <dependency>
                 <groupId>org.apache.shiro.samples</groupId>
                 <artifactId>samples-spring-client</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-spring-boot-starter</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-spring-boot-web-starter</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
 
 
@@ -754,21 +765,21 @@
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-core</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
                 <type>test-jar</type>
                 <scope>test</scope>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro</groupId>
                 <artifactId>shiro-config-ogdl</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
                 <type>test-jar</type>
                 <scope>test</scope>
             </dependency>
             <dependency>
                 <groupId>org.apache.shiro.integrationtests</groupId>
                 <artifactId>shiro-its-support</artifactId>
-                <version>2.alpha.0-SNAPSHOT</version>
+                <version>1.4.0-SNAPSHOT</version>
             </dependency>
 
             <!-- 3rd party dependencies -->
@@ -1332,7 +1343,7 @@
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-source-plugin</artifactId>
-                        <version>2.0.4</version>
+                        <version>2.2.1</version>
                         <executions>
                             <execution>
                                 <id>attach-sources</id>
@@ -1352,7 +1363,7 @@
                 <site>
                     <id>shiro.website</id>
                     <name>Apache Shiro Site</name>
-                    <url>scp://people.apache.org/www/shiro.apache.org/static/${project.version}</url>
+                    <url>scm:svn:https://svn.apache.org/repos/asf/shiro/site/publish/static/${project.version}</url>
                 </site>
             </distributionManagement>
         </profile>

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/samples/aspectj/pom.xml
----------------------------------------------------------------------
diff --git a/samples/aspectj/pom.xml b/samples/aspectj/pom.xml
index 7102685..154af00 100644
--- a/samples/aspectj/pom.xml
+++ b/samples/aspectj/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
         <groupId>org.apache.shiro.samples</groupId>
         <artifactId>shiro-samples</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
 	    <relativePath>../pom.xml</relativePath>
         </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/samples/guice/pom.xml
----------------------------------------------------------------------
diff --git a/samples/guice/pom.xml b/samples/guice/pom.xml
index 417966a..95bde54 100644
--- a/samples/guice/pom.xml
+++ b/samples/guice/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
         <groupId>org.apache.shiro.samples</groupId>
         <artifactId>shiro-samples</artifactId>
-		<version>2.alpha.0-SNAPSHOT</version>
+		<version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
 	</parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/samples/jaxrs/pom.xml
----------------------------------------------------------------------
diff --git a/samples/jaxrs/pom.xml b/samples/jaxrs/pom.xml
index 33758e5..da02fed 100644
--- a/samples/jaxrs/pom.xml
+++ b/samples/jaxrs/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.shiro.samples</groupId>
         <artifactId>shiro-samples</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/samples/pom.xml
----------------------------------------------------------------------
diff --git a/samples/pom.xml b/samples/pom.xml
index bd7102b..7bd9e83 100644
--- a/samples/pom.xml
+++ b/samples/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/samples/quickstart-guice/pom.xml
----------------------------------------------------------------------
diff --git a/samples/quickstart-guice/pom.xml b/samples/quickstart-guice/pom.xml
index 1070789..de43abd 100644
--- a/samples/quickstart-guice/pom.xml
+++ b/samples/quickstart-guice/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.shiro.samples</groupId>
         <artifactId>shiro-samples</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/samples/quickstart/pom.xml
----------------------------------------------------------------------
diff --git a/samples/quickstart/pom.xml b/samples/quickstart/pom.xml
index c950d61..70978ac 100644
--- a/samples/quickstart/pom.xml
+++ b/samples/quickstart/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.shiro.samples</groupId>
         <artifactId>shiro-samples</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/samples/servlet-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/samples/servlet-plugin/pom.xml b/samples/servlet-plugin/pom.xml
index 66cce9c..95388d7 100644
--- a/samples/servlet-plugin/pom.xml
+++ b/samples/servlet-plugin/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.shiro.samples</groupId>
         <artifactId>shiro-samples</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/samples/spring-boot-web/pom.xml
----------------------------------------------------------------------
diff --git a/samples/spring-boot-web/pom.xml b/samples/spring-boot-web/pom.xml
index 82ed75e..a45952e 100644
--- a/samples/spring-boot-web/pom.xml
+++ b/samples/spring-boot-web/pom.xml
@@ -25,7 +25,7 @@
     <parent>
         <groupId>org.apache.shiro.samples</groupId>
         <artifactId>shiro-samples</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>samples-spring-boot-web</artifactId>

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/samples/spring-client/pom.xml
----------------------------------------------------------------------
diff --git a/samples/spring-client/pom.xml b/samples/spring-client/pom.xml
index 19660fd..bd55849 100644
--- a/samples/spring-client/pom.xml
+++ b/samples/spring-client/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.shiro.samples</groupId>
         <artifactId>shiro-samples</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/samples/spring-hibernate/pom.xml
----------------------------------------------------------------------
diff --git a/samples/spring-hibernate/pom.xml b/samples/spring-hibernate/pom.xml
index c8ec313..a93edda 100644
--- a/samples/spring-hibernate/pom.xml
+++ b/samples/spring-hibernate/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.shiro.samples</groupId>
         <artifactId>shiro-samples</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/samples/spring/pom.xml
----------------------------------------------------------------------
diff --git a/samples/spring/pom.xml b/samples/spring/pom.xml
index 90eb451..30361fa 100644
--- a/samples/spring/pom.xml
+++ b/samples/spring/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.shiro.samples</groupId>
         <artifactId>shiro-samples</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/samples/web/pom.xml
----------------------------------------------------------------------
diff --git a/samples/web/pom.xml b/samples/web/pom.xml
index b2b2e28..58f94e1 100644
--- a/samples/web/pom.xml
+++ b/samples/web/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.shiro.samples</groupId>
         <artifactId>shiro-samples</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/support/aspectj/pom.xml
----------------------------------------------------------------------
diff --git a/support/aspectj/pom.xml b/support/aspectj/pom.xml
index 3857516..4df8c09 100644
--- a/support/aspectj/pom.xml
+++ b/support/aspectj/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/support/ehcache/pom.xml
----------------------------------------------------------------------
diff --git a/support/ehcache/pom.xml b/support/ehcache/pom.xml
index 012aea1..0bd278d 100644
--- a/support/ehcache/pom.xml
+++ b/support/ehcache/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/support/features/pom.xml
----------------------------------------------------------------------
diff --git a/support/features/pom.xml b/support/features/pom.xml
index 281c801..2d18ad7 100644
--- a/support/features/pom.xml
+++ b/support/features/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/support/guice/pom.xml
----------------------------------------------------------------------
diff --git a/support/guice/pom.xml b/support/guice/pom.xml
index 295243b..f91cb4e 100644
--- a/support/guice/pom.xml
+++ b/support/guice/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/support/hazelcast/pom.xml
----------------------------------------------------------------------
diff --git a/support/hazelcast/pom.xml b/support/hazelcast/pom.xml
index a2c27e8..7a81aaf 100644
--- a/support/hazelcast/pom.xml
+++ b/support/hazelcast/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/support/jaxrs/pom.xml
----------------------------------------------------------------------
diff --git a/support/jaxrs/pom.xml b/support/jaxrs/pom.xml
index f769594..05b3c5b 100644
--- a/support/jaxrs/pom.xml
+++ b/support/jaxrs/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-support</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/support/pom.xml
----------------------------------------------------------------------
diff --git a/support/pom.xml b/support/pom.xml
index f54016e..001f8a6 100644
--- a/support/pom.xml
+++ b/support/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/support/quartz/pom.xml
----------------------------------------------------------------------
diff --git a/support/quartz/pom.xml b/support/quartz/pom.xml
index 73862d5..78b0058 100644
--- a/support/quartz/pom.xml
+++ b/support/quartz/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/support/servlet-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/support/servlet-plugin/pom.xml b/support/servlet-plugin/pom.xml
index a76cf3c..4950cea 100644
--- a/support/servlet-plugin/pom.xml
+++ b/support/servlet-plugin/pom.xml
@@ -25,7 +25,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-support</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>shiro-servlet-plugin</artifactId>

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/support/spring-boot/pom.xml
----------------------------------------------------------------------
diff --git a/support/spring-boot/pom.xml b/support/spring-boot/pom.xml
index 82d183c..94cf20c 100644
--- a/support/spring-boot/pom.xml
+++ b/support/spring-boot/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/support/spring-boot/spring-boot-starter/pom.xml
----------------------------------------------------------------------
diff --git a/support/spring-boot/spring-boot-starter/pom.xml b/support/spring-boot/spring-boot-starter/pom.xml
index 73847d6..d9ad99a 100644
--- a/support/spring-boot/spring-boot-starter/pom.xml
+++ b/support/spring-boot/spring-boot-starter/pom.xml
@@ -25,7 +25,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-spring-boot</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>shiro-spring-boot-starter</artifactId>

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/support/spring-boot/spring-boot-web-starter/pom.xml
----------------------------------------------------------------------
diff --git a/support/spring-boot/spring-boot-web-starter/pom.xml b/support/spring-boot/spring-boot-web-starter/pom.xml
index 55b693a..15d9d9a 100644
--- a/support/spring-boot/spring-boot-web-starter/pom.xml
+++ b/support/spring-boot/spring-boot-web-starter/pom.xml
@@ -25,7 +25,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-spring-boot</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>shiro-spring-boot-web-starter</artifactId>

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/support/spring/pom.xml
----------------------------------------------------------------------
diff --git a/support/spring/pom.xml b/support/spring/pom.xml
index ff61e4b..3aa7155 100644
--- a/support/spring/pom.xml
+++ b/support/spring/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/test-coverage/pom.xml
----------------------------------------------------------------------
diff --git a/test-coverage/pom.xml b/test-coverage/pom.xml
index c25f9a3..8705d61 100644
--- a/test-coverage/pom.xml
+++ b/test-coverage/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/tools/hasher/pom.xml
----------------------------------------------------------------------
diff --git a/tools/hasher/pom.xml b/tools/hasher/pom.xml
index 4c15405..4579b56 100644
--- a/tools/hasher/pom.xml
+++ b/tools/hasher/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.shiro.tools</groupId>
         <artifactId>shiro-tools</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/tools/pom.xml
----------------------------------------------------------------------
diff --git a/tools/pom.xml b/tools/pom.xml
index b21a2cc..c2c0324 100644
--- a/tools/pom.xml
+++ b/tools/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/shiro/blob/53f1f6da/web/pom.xml
----------------------------------------------------------------------
diff --git a/web/pom.xml b/web/pom.xml
index 2971c9d..a099f6a 100644
--- a/web/pom.xml
+++ b/web/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
+        <version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 


[3/8] shiro git commit: SHIRO-206 - Removing shiro-faces from master (for now)

Posted by bd...@apache.org.
SHIRO-206 - Removing shiro-faces from master (for now)


Project: http://git-wip-us.apache.org/repos/asf/shiro/repo
Commit: http://git-wip-us.apache.org/repos/asf/shiro/commit/3fccc75a
Tree: http://git-wip-us.apache.org/repos/asf/shiro/tree/3fccc75a
Diff: http://git-wip-us.apache.org/repos/asf/shiro/diff/3fccc75a

Branch: refs/heads/master
Commit: 3fccc75a644adb4ac7b390c3635573e5fe243bc4
Parents: 53f1f6d
Author: Brian Demers <bd...@apache.org>
Authored: Mon Nov 7 15:15:11 2016 -0500
Committer: Brian Demers <bd...@apache.org>
Committed: Mon Nov 7 15:15:48 2016 -0500

----------------------------------------------------------------------
 all/pom.xml                                     |   4 -
 support/faces/pom.xml                           |  80 -------
 .../shiro/web/faces/tags/AuthenticatedTag.java  |  50 -----
 .../web/faces/tags/AuthorizationTagHandler.java |  62 ------
 .../apache/shiro/web/faces/tags/GuestTag.java   |  42 ----
 .../web/faces/tags/HasAnyPermissionsTag.java    |  57 -----
 .../shiro/web/faces/tags/HasAnyRolesTag.java    |  57 -----
 .../shiro/web/faces/tags/HasPermissionTag.java  |  43 ----
 .../apache/shiro/web/faces/tags/HasRoleTag.java |  40 ----
 .../web/faces/tags/LacksPermissionTag.java      |  37 ----
 .../shiro/web/faces/tags/LacksRoleTag.java      |  36 ---
 .../web/faces/tags/NotAuthenticatedTag.java     |  41 ----
 .../shiro/web/faces/tags/PrincipalTag.java      | 220 -------------------
 .../shiro/web/faces/tags/RememberedTag.java     |  46 ----
 .../shiro/web/faces/tags/SecureComponent.java   |  57 -----
 .../shiro/web/faces/tags/SecureTagHandler.java  |  61 -----
 .../apache/shiro/web/faces/tags/UserTag.java    |  51 -----
 .../shiro/web/faces/tags/package-info.java      |  30 ---
 .../main/resources/META-INF/faces-config.xml    |  31 ---
 .../resources/META-INF/shiro-faces.taglib.xml   | 135 ------------
 support/pom.xml                                 |   1 -
 21 files changed, 1181 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/shiro/blob/3fccc75a/all/pom.xml
----------------------------------------------------------------------
diff --git a/all/pom.xml b/all/pom.xml
index 7fa265a..ce3d1c3 100644
--- a/all/pom.xml
+++ b/all/pom.xml
@@ -79,10 +79,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.shiro</groupId>
-            <artifactId>shiro-faces</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.shiro</groupId>
             <artifactId>shiro-guice</artifactId>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/shiro/blob/3fccc75a/support/faces/pom.xml
----------------------------------------------------------------------
diff --git a/support/faces/pom.xml b/support/faces/pom.xml
deleted file mode 100644
index f4c1159..0000000
--- a/support/faces/pom.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?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">
-
-    <parent>
-        <groupId>org.apache.shiro</groupId>
-        <artifactId>shiro-root</artifactId>
-        <version>2.alpha.0-SNAPSHOT</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>shiro-faces</artifactId>
-    <name>Apache Shiro :: Support :: JSF</name>
-    <packaging>bundle</packaging>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.shiro</groupId>
-            <artifactId>shiro-web</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>javax.faces</groupId>
-            <artifactId>jsf-api</artifactId>
-            <version>2.0</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>javax.el</groupId>
-            <artifactId>el-api</artifactId>
-            <version>1.0</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>jcl-over-slf4j</artifactId>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-SymbolicName>org.apache.shiro.web.faces</Bundle-SymbolicName>
-                        <Export-Package>org.apache.shiro.web.faces*;version=${project.version}</Export-Package>
-                        <Import-Package>
-                            org.apache.shiro*;version="${shiro.osgi.importRange}",
-                            javax.faces*;version="[2.0, 3.0)",
-                            javax.el*;version="[1.0, 2.0)",
-                            *
-                        </Import-Package>
-                    </instructions>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/shiro/blob/3fccc75a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/AuthenticatedTag.java
----------------------------------------------------------------------
diff --git a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/AuthenticatedTag.java b/support/faces/src/main/java/org/apache/shiro/web/faces/tags/AuthenticatedTag.java
deleted file mode 100755
index 03f980d..0000000
--- a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/AuthenticatedTag.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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 org.apache.shiro.web.faces.tags;
-
-import javax.faces.view.facelets.TagConfig;
-
-/**
- * Tag that renders the tag body only if the current user has executed a <b>successful</b> authentication attempt
- * <em>during their current session</em>.
- * <p/>
- * This is more restrictive than the {@link UserTag}, which only
- * ensures the current user is known to the system, either via a current login or from Remember Me services,
- * which only makes the assumption that the current user is who they say they are, and does not guarantee it like
- * this tag does.
- * <p/>
- * The logically opposite tag of this one is the {@link NotAuthenticatedTag}
- *
- * @since 2.0
- */
-public class AuthenticatedTag extends SecureTagHandler {
-
-    public AuthenticatedTag(TagConfig config) {
-        super(config);
-    }
-
-    @Override
-    protected boolean showTagBody() {
-        return isAuthenticated();
-    }
-
-    protected boolean isAuthenticated() {
-        return getSubject() != null && getSubject().isAuthenticated();
-    }
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3fccc75a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/AuthorizationTagHandler.java
----------------------------------------------------------------------
diff --git a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/AuthorizationTagHandler.java b/support/faces/src/main/java/org/apache/shiro/web/faces/tags/AuthorizationTagHandler.java
deleted file mode 100644
index b2bca1c..0000000
--- a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/AuthorizationTagHandler.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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 org.apache.shiro.web.faces.tags;
-
-import javax.el.ValueExpression;
-import javax.faces.component.UIComponent;
-import javax.faces.view.facelets.FaceletContext;
-import javax.faces.view.facelets.TagAttribute;
-import javax.faces.view.facelets.TagConfig;
-
-/**
- * Tag handler which shows or hides body content based on the current Subject's authorization state.  'Authorization
- * state' means whether or not they have or do not have a role or whether they are permitted to do something or not.
- *
- * @since 2.0
- */
-public abstract class AuthorizationTagHandler extends SecureTagHandler {
-
-    private final TagAttribute name;
-
-    public AuthorizationTagHandler(TagConfig config) {
-        super(config);
-        this.name = this.getRequiredAttribute("name");
-    }
-
-    private String getAttrValue(FaceletContext ctx, TagAttribute attr) {
-        String value;
-        if (attr.isLiteral()) {
-            value = attr.getValue(ctx);
-        } else {
-            ValueExpression expression = attr.getValueExpression(ctx, String.class);
-            value = (String) expression.getValue(ctx);
-        }
-        return value;
-    }
-
-    @Override 
-    protected boolean showTagBody(FaceletContext ctx, UIComponent parent) {
-        String value = getAttrValue(ctx, name);
-        return showTagBody(value);
-    }
-    
-    protected boolean showTagBody(String nameAttributeValue) {
-        return false;
-    }
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3fccc75a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/GuestTag.java
----------------------------------------------------------------------
diff --git a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/GuestTag.java b/support/faces/src/main/java/org/apache/shiro/web/faces/tags/GuestTag.java
deleted file mode 100755
index 3506ac3..0000000
--- a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/GuestTag.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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 org.apache.shiro.web.faces.tags;
-
-import javax.faces.view.facelets.TagConfig;
-
-/**
- * Tag that renders the tag body if the current user <em>is not</em> known to the system, either because they
- * haven't logged in yet, or because they have no 'RememberMe' identity.
- *
- * <p>The logically opposite tag of this one is the {@link UserTag}.  Please read that class's JavaDoc as it explains
- * more about the differences between Authenticated/Unauthenticated and User/Guest semantic differences.
- *
- * @since 2.0
- */
-public class GuestTag extends UserTag {
-
-    public GuestTag(TagConfig config) {
-        super(config);
-    }
-
-    @Override
-    protected boolean showTagBody() {
-        return !isUser();
-    }
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3fccc75a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/HasAnyPermissionsTag.java
----------------------------------------------------------------------
diff --git a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/HasAnyPermissionsTag.java b/support/faces/src/main/java/org/apache/shiro/web/faces/tags/HasAnyPermissionsTag.java
deleted file mode 100755
index daa197e..0000000
--- a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/HasAnyPermissionsTag.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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 org.apache.shiro.web.faces.tags;
-
-import org.apache.shiro.subject.Subject;
-import org.apache.shiro.util.StringUtils;
-
-import javax.faces.view.facelets.TagConfig;
-
-/**
- * Tag that renders the tag body only if the current user has <em>at least one</em> of the comma-delimited
- * string permissions specified in <tt>name</tt> attribute.
- *
- * @since 2.0
- */
-public class HasAnyPermissionsTag extends AuthorizationTagHandler {
-
-    public HasAnyPermissionsTag(TagConfig config) {
-        super(config);
-    }
-
-    @Override
-    protected boolean showTagBody(String commaDelimitedPermissions) {
-        boolean hasAnyPermission = false;
-
-        Subject subject = getSubject();
-
-        if (subject != null) {
-            // Iterate through permissions and check to see if the user has one of the permission
-            String[] permissions = StringUtils.split(commaDelimitedPermissions);
-            for (String permission : permissions) {
-                if (subject.isPermitted(permission)) {
-                    hasAnyPermission = true;
-                    break;
-                }
-            }
-        }
-
-        return hasAnyPermission;
-    }
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3fccc75a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/HasAnyRolesTag.java
----------------------------------------------------------------------
diff --git a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/HasAnyRolesTag.java b/support/faces/src/main/java/org/apache/shiro/web/faces/tags/HasAnyRolesTag.java
deleted file mode 100755
index 045dc7e..0000000
--- a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/HasAnyRolesTag.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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 org.apache.shiro.web.faces.tags;
-
-import org.apache.shiro.subject.Subject;
-import org.apache.shiro.util.StringUtils;
-
-import javax.faces.view.facelets.TagConfig;
-
-/**
- * Displays body content if the current user has any of the roles specified.
- *
- * @since 2.0
- */
-public class HasAnyRolesTag extends AuthorizationTagHandler {
-
-    public HasAnyRolesTag(TagConfig config) {
-        super(config);
-    }
-
-    @Override
-    protected boolean showTagBody(String commaDelimitedRoleNames) {
-        boolean hasAnyRole = false;
-
-        Subject subject = getSubject();
-
-        if (subject != null) {
-            // Iterate through roles and check to see if the user has one of the roles
-            String[] roleNames = StringUtils.split(commaDelimitedRoleNames);
-            for (String roleName : roleNames) {
-                if (subject.hasRole(roleName)) {
-                    hasAnyRole = true;
-                    break;
-                }
-            }
-        }
-
-        return hasAnyRole;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3fccc75a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/HasPermissionTag.java
----------------------------------------------------------------------
diff --git a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/HasPermissionTag.java b/support/faces/src/main/java/org/apache/shiro/web/faces/tags/HasPermissionTag.java
deleted file mode 100755
index 9a35b55..0000000
--- a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/HasPermissionTag.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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 org.apache.shiro.web.faces.tags;
-
-import javax.faces.view.facelets.TagConfig;
-
-/**
- * Tag that renders the tag body only if the current user has the string permissions
- * specified in <tt>name</tt> attribute.
- *
- * @since 2.0
- */
-public class HasPermissionTag extends AuthorizationTagHandler {
-
-    public HasPermissionTag(TagConfig config) {
-        super(config);
-    }
-
-    @Override
-    protected boolean showTagBody(String p) {
-        return isPermitted(p);
-    }
-    
-    protected boolean isPermitted(String p) {
-        return getSubject() != null && getSubject().isPermitted(p);
-    }
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3fccc75a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/HasRoleTag.java
----------------------------------------------------------------------
diff --git a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/HasRoleTag.java b/support/faces/src/main/java/org/apache/shiro/web/faces/tags/HasRoleTag.java
deleted file mode 100755
index 196c40a..0000000
--- a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/HasRoleTag.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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 org.apache.shiro.web.faces.tags;
-
-import javax.faces.view.facelets.TagConfig;
-
-/**
- * @since 2.0
- */
-public class HasRoleTag extends AuthorizationTagHandler {
-
-    public HasRoleTag(TagConfig config) {
-        super(config);
-    }
-
-    @Override 
-    protected boolean showTagBody(String value) {
-        return hasRole(value);
-    }
-    
-    protected boolean hasRole(String roleName) {
-        return getSubject() != null && getSubject().hasRole(roleName);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/shiro/blob/3fccc75a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/LacksPermissionTag.java
----------------------------------------------------------------------
diff --git a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/LacksPermissionTag.java b/support/faces/src/main/java/org/apache/shiro/web/faces/tags/LacksPermissionTag.java
deleted file mode 100755
index 7088ad4..0000000
--- a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/LacksPermissionTag.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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 org.apache.shiro.web.faces.tags;
-
-import javax.faces.view.facelets.TagConfig;
-
-/**
- * @since 2.0
- */
-public class LacksPermissionTag extends HasPermissionTag {
-
-    public LacksPermissionTag(TagConfig config) {
-        super(config);
-    }
-
-    @Override
-    protected boolean showTagBody(String p) {
-        return !isPermitted(p);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3fccc75a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/LacksRoleTag.java
----------------------------------------------------------------------
diff --git a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/LacksRoleTag.java b/support/faces/src/main/java/org/apache/shiro/web/faces/tags/LacksRoleTag.java
deleted file mode 100755
index 1bda8f3..0000000
--- a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/LacksRoleTag.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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 org.apache.shiro.web.faces.tags;
-
-import javax.faces.view.facelets.TagConfig;
-
-/**
- * @since 2.0
- */
-public class LacksRoleTag extends HasRoleTag {
-
-    public LacksRoleTag(TagConfig config) {
-        super(config);
-    }
-
-    @Override
-    protected boolean showTagBody(String value) {
-        return !hasRole(value);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/shiro/blob/3fccc75a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/NotAuthenticatedTag.java
----------------------------------------------------------------------
diff --git a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/NotAuthenticatedTag.java b/support/faces/src/main/java/org/apache/shiro/web/faces/tags/NotAuthenticatedTag.java
deleted file mode 100755
index a7ba548..0000000
--- a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/NotAuthenticatedTag.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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 org.apache.shiro.web.faces.tags;
-
-import javax.faces.view.facelets.TagConfig;
-
-/**
- * Tag that renders the tag body only if the current user has <em>not</em> executed a successful authentication
- * attempt <em>during their current session</em>.
- *
- * <p>The logically opposite tag of this one is the {@link AuthenticatedTag}.
- *
- * @since 2.0
- */
-public class NotAuthenticatedTag extends AuthenticatedTag {
-
-    public NotAuthenticatedTag(TagConfig config) {
-        super(config);
-    }
-
-    @Override
-    protected boolean showTagBody() {
-        return !isAuthenticated();
-    }
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3fccc75a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/PrincipalTag.java
----------------------------------------------------------------------
diff --git a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/PrincipalTag.java b/support/faces/src/main/java/org/apache/shiro/web/faces/tags/PrincipalTag.java
deleted file mode 100755
index a746bab..0000000
--- a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/PrincipalTag.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * 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 org.apache.shiro.web.faces.tags;
-
-import org.apache.shiro.subject.PrincipalCollection;
-
-import javax.faces.context.FacesContext;
-import java.beans.BeanInfo;
-import java.beans.Introspector;
-import java.beans.PropertyDescriptor;
-import java.io.IOException;
-import java.lang.reflect.Modifier;
-
-/**
- * Tag used to print out the String value of a user's default principal,
- * or a specific principal as specified by the tag's attributes.
- * <p/>
- * If no attributes are specified, the tag prints out the {@code toString()} value of the user's default principal.
- * If the {@code type} attribute is specified, the tag looks for a principal with the given type.  If the
- * {@code property} attribute is specified, the tag prints the string value of the specified property of the principal.
- * If no principal is found or the user is not authenticated, the tag displays nothing unless a
- * {@code defaultValue} is specified.
- *
- * @since 2.0
- */
-public class PrincipalTag extends SecureComponent {
-
-    /**
-     * The type of principal to be retrieved, or null if the default principal should be used.
-     */
-    private String type;
-
-    /**
-     * The property name to retrieve of the principal, or null if the <tt>toString()</tt> value should be used.
-     */
-    private String property;
-
-    /**
-     * The default value that should be displayed if the user is not authenticated, or no principal is found.
-     */
-    private String defaultValue;
-
-    /*--------------------------------------------
-    |  A C C E S S O R S / M O D I F I E R S    |
-    ============================================*/
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    public String getProperty() {
-        return property;
-    }
-
-    public void setProperty(String property) {
-        this.property = property;
-    }
-
-    public String getDefaultValue() {
-        return defaultValue;
-    }
-
-    public void setDefaultValue(String defaultValue) {
-        this.defaultValue = defaultValue;
-    }
-
-    /*--------------------------------------------
-    |               M E T H O D S               |
-    ============================================*/
-    @SuppressWarnings({"unchecked"})
-    @Override
-    protected void doEncodeAll(FacesContext ctx) throws IOException {
-        String strValue = null;
-
-        try {
-            if (getSubject() != null) {
-                // Get the principal to print out
-                Object principal;
-
-                if (type == null) {
-                    principal = getSubject().getPrincipal();
-                } else {
-                    principal = getPrincipalFromClassName();
-                }
-
-                // Get the string value of the principal
-                if (principal != null) {
-                    if (property == null) {
-                        strValue = principal.toString();
-                    } else {
-                        strValue = getPrincipalProperty(principal, property);
-                    }
-                }
-            }
-        } catch (Exception e) {
-            log.error("Error getting principal type [" + type + "], property [" + property + "]: " + e.getMessage(), e);
-        }
-
-        if (strValue == null) {
-            strValue = defaultValue;
-        }
-
-        // Print out the principal value if not null
-        if (strValue != null) {
-            try {
-                ctx.getResponseWriter().write(strValue);
-            } catch (IOException e) {
-                throw new IOException("Error writing [" + strValue + "] to output.");
-            }
-        }
-    }
-
-    @SuppressWarnings({"unchecked"})
-    private Object getPrincipalFromClassName() {
-        Object principal = null;
-
-        try {
-            Class cls = Class.forName(type);
-            PrincipalCollection principals = getSubject().getPrincipals();
-            if (principals != null) {
-                principal = principals.oneByType(cls);
-            }
-        } catch (ClassNotFoundException e) {
-            if (log.isErrorEnabled()) {
-                log.error("Unable to find class for name [" + type + "]");
-            }
-        } catch (Exception e) {
-            if (log.isErrorEnabled()) {
-                log.error("Unknown error while getting principal for type [" + type + "]: " + e.getMessage(), e);
-            }
-        }
-        return principal;
-    }
-
-    private String getPrincipalProperty(Object principal, String property) throws IOException {
-        String strValue = null;
-
-        try {
-            BeanInfo bi = Introspector.getBeanInfo(principal.getClass());
-
-            // Loop through the properties to get the string value of the specified property
-            boolean foundProperty = false;
-            for (PropertyDescriptor pd : bi.getPropertyDescriptors()) {
-                if (pd.getName().equals(property) && (Modifier.isPublic(pd.getReadMethod().getModifiers()))) {
-                    Object value = null;
-                    try {
-                        pd.getReadMethod().setAccessible(true);
-                        value = pd.getReadMethod().invoke(principal, (Object[]) null);
-                    } finally {
-                        pd.getReadMethod().setAccessible(false);
-                    }
-                    strValue = String.valueOf(value);
-                    foundProperty = true;
-                    break;
-                }
-            }
-
-            if (!foundProperty) {
-                final String message = "Property [" + property + "] not found in principal of type [" + principal.getClass().getName() + "]";
-                if (log.isErrorEnabled()) {
-                    log.error(message);
-                }
-                throw new IOException(message);
-            }
-
-        } catch (Exception e) {
-            final String message = "Error reading property [" + property + "] from principal of type [" + principal.getClass().getName() + "]";
-            if (log.isErrorEnabled()) {
-                log.error(message, e);
-            }
-            throw new IOException(message);
-        }
-
-        return strValue;
-    }
-
-    // ----------------------------------------------------- StateHolder Methods
-    private Object[] values;
-
-    @Override
-    public Object saveState(FacesContext context) {
-        if (values == null) {
-            values = new Object[4];
-        }
-        values[0] = super.saveState(context);
-        values[1] = type;
-        values[2] = property;
-        values[3] = defaultValue;
-
-        return values;
-    }
-
-    @Override
-    public void restoreState(FacesContext context, Object state) {
-        values = (Object[]) state;
-        super.restoreState(context, values[0]);
-        type = (String) values[1];
-        property = (String) values[2];
-        defaultValue = (String) values[3];
-    }
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3fccc75a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/RememberedTag.java
----------------------------------------------------------------------
diff --git a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/RememberedTag.java b/support/faces/src/main/java/org/apache/shiro/web/faces/tags/RememberedTag.java
deleted file mode 100755
index 502c7f4..0000000
--- a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/RememberedTag.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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 org.apache.shiro.web.faces.tags;
-
-import javax.faces.view.facelets.TagConfig;
-
-/**
- * Tag that renders the tag body only if the current user's identity (aka principals) is remembered from a
- * successful authentication during a previous session and the user has <b>not</b> executed a successful authentication
- * attempt during their current session.
- * <p/>
- * <b>Note:</b> This is <em>less</em> restrictive than the <code>AuthenticatedTag</code> since it only assumes
- * the user is who they say they are <em>via Remember Me services</em>, which
- * makes no guarantee the user is who they say they are.  The <code>AuthenticatedTag</code> however
- * guarantees that the current user has logged in <em>during their current session</em>, proving they really are
- * who they say they are.
- *
- * @since 2.0
- */
-public class RememberedTag extends SecureTagHandler {
-
-    public RememberedTag(TagConfig config) {
-        super(config);
-    }
-
-    @Override
-    protected boolean showTagBody() {
-        return getSubject() != null && getSubject().isRemembered();
-    }
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3fccc75a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/SecureComponent.java
----------------------------------------------------------------------
diff --git a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/SecureComponent.java b/support/faces/src/main/java/org/apache/shiro/web/faces/tags/SecureComponent.java
deleted file mode 100755
index ddfe9e0..0000000
--- a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/SecureComponent.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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 org.apache.shiro.web.faces.tags;
-
-import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.subject.Subject;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.faces.component.UIOutput;
-import javax.faces.context.FacesContext;
-import java.io.IOException;
-
-/**
- * Base class for JSF components.
- *
- * <p>OBS: Your subclass is responsible for saving the state of the component. See {@link org.apache.shiro.web.faces.tags.PrincipalTag}'s
- * StateHolder Methods for an exemple.
- * 
- * @since 2.0
- */
-public abstract class SecureComponent extends UIOutput {
-
-    protected final Logger log = LoggerFactory.getLogger(this.getClass());
-
-    protected Subject getSubject() {
-        return SecurityUtils.getSubject();
-    }
-
-    @Override
-    public void encodeAll(FacesContext ctx) throws IOException {
-        verifyAttributes();
-        doEncodeAll(ctx);
-    }
-
-    protected void verifyAttributes() throws IOException {
-    }
-
-    protected abstract void doEncodeAll(FacesContext ctx) throws IOException;
-    
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3fccc75a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/SecureTagHandler.java
----------------------------------------------------------------------
diff --git a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/SecureTagHandler.java b/support/faces/src/main/java/org/apache/shiro/web/faces/tags/SecureTagHandler.java
deleted file mode 100755
index 0bf1538..0000000
--- a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/SecureTagHandler.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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 org.apache.shiro.web.faces.tags;
-
-import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.subject.Subject;
-
-import javax.el.ELException;
-import javax.faces.FacesException;
-import javax.faces.component.UIComponent;
-import javax.faces.view.facelets.FaceletContext;
-import javax.faces.view.facelets.TagConfig;
-import javax.faces.view.facelets.TagHandler;
-import java.io.IOException;
-
-/**
- * Base class for all Shiro TagHandlers
- * 
- * @since 2.0
- */
-public abstract class SecureTagHandler extends TagHandler {
-
-    public SecureTagHandler(TagConfig config) {
-        super(config);
-    }
-
-    protected Subject getSubject() {
-        return SecurityUtils.getSubject();
-    }
-
-    public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, ELException {
-        if (showTagBody(ctx, parent)) {
-            this.nextHandler.apply(ctx, parent);
-        }
-    }
-
-    protected boolean showTagBody(FaceletContext ctx, UIComponent parent) {
-        return showTagBody();
-    }
-
-    protected boolean showTagBody() {
-        return false;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3fccc75a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/UserTag.java
----------------------------------------------------------------------
diff --git a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/UserTag.java b/support/faces/src/main/java/org/apache/shiro/web/faces/tags/UserTag.java
deleted file mode 100755
index b7b75a5..0000000
--- a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/UserTag.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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 org.apache.shiro.web.faces.tags;
-
-import javax.faces.view.facelets.TagConfig;
-
-/**
- * Tag that renders the tag body if the current user known to the system, either from a successful login attempt
- * (not necessarily during the current session) or from 'RememberMe' services.
- * <p/>
- * <b>Note:</b> This is <em>less</em> restrictive than the <code>AuthenticatedTag</code> since it only assumes
- * the user is who they say they are, either via a current session login <em>or</em> via Remember Me services, which
- * makes no guarantee the user is who they say they are.  The <code>AuthenticatedTag</code> however
- * guarantees that the current user has logged in <em>during their current session</em>, proving they really are
- * who they say they are.
- * <p/>
- * The logically opposite tag of this one is the {@link GuestTag}.
- *
- * @since 2.0
- */
-public class UserTag extends SecureTagHandler {
-
-    public UserTag(TagConfig config) {
-        super(config);
-    }
-
-    @Override
-    protected boolean showTagBody() {
-        return isUser();
-    }
-
-    protected boolean isUser() {
-        return getSubject() != null && getSubject().getPrincipal() != null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/shiro/blob/3fccc75a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/package-info.java
----------------------------------------------------------------------
diff --git a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/package-info.java b/support/faces/src/main/java/org/apache/shiro/web/faces/tags/package-info.java
deleted file mode 100755
index a6e310f..0000000
--- a/support/faces/src/main/java/org/apache/shiro/web/faces/tags/package-info.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.
- */
-
-/**
- * Provides the Shiro JSF Tag Library implementations.
- *
- * <p>Shiro JSF Tags can be used to evalute or not evaluate (show or not show) parts of a JSF page
- * based on the current user's authentication status and/or authorization (access control) abilities.</p>
- *
- * @since 2.0
- */
-package org.apache.shiro.web.faces.tags;
-
-

http://git-wip-us.apache.org/repos/asf/shiro/blob/3fccc75a/support/faces/src/main/resources/META-INF/faces-config.xml
----------------------------------------------------------------------
diff --git a/support/faces/src/main/resources/META-INF/faces-config.xml b/support/faces/src/main/resources/META-INF/faces-config.xml
deleted file mode 100755
index 7ff30a1..0000000
--- a/support/faces/src/main/resources/META-INF/faces-config.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?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.
-  -->
-<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
-              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
-              version="2.0"
-              metadata-complete="false">
-
-    <component>
-        <component-type>org.apache.shiro.web.faces.tags.PrincipalTag</component-type>
-        <component-class>org.apache.shiro.web.faces.tags.PrincipalTag</component-class>
-    </component>
-
-</faces-config>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/shiro/blob/3fccc75a/support/faces/src/main/resources/META-INF/shiro-faces.taglib.xml
----------------------------------------------------------------------
diff --git a/support/faces/src/main/resources/META-INF/shiro-faces.taglib.xml b/support/faces/src/main/resources/META-INF/shiro-faces.taglib.xml
deleted file mode 100755
index ef6dd83..0000000
--- a/support/faces/src/main/resources/META-INF/shiro-faces.taglib.xml
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  ~ 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.
-  -->
-<facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibary_2_0.xsd"
-        version="2.0">
-
-    <namespace>http://shiro.apache.org/tags</namespace>
-
-    <tag>
-        <tag-name>user</tag-name>
-        <handler-class>org.apache.shiro.web.faces.tags.UserTag</handler-class>
-    </tag>
-
-    <tag>
-        <tag-name>authenticated</tag-name>
-        <handler-class>org.apache.shiro.web.faces.tags.AuthenticatedTag</handler-class>
-    </tag>
-
-    <tag>
-        <tag-name>guest</tag-name>
-        <handler-class>org.apache.shiro.web.faces.tags.GuestTag</handler-class>
-    </tag>
-
-    <tag>
-        <tag-name>hasAnyPermissions</tag-name>
-        <handler-class>org.apache.shiro.web.faces.tags.HasAnyPermissionsTag</handler-class>
-        <attribute>
-            <name>name</name>
-            <description></description>
-            <required>true</required>
-        </attribute>
-    </tag>
-
-    <tag>
-        <tag-name>hasAnyRoles</tag-name>
-        <handler-class>org.apache.shiro.web.faces.tags.HasAnyRolesTag</handler-class>
-        <attribute>
-            <name>name</name>
-            <description></description>
-            <required>true</required>
-        </attribute>
-    </tag>
-
-    <tag>
-        <tag-name>hasPermission</tag-name>
-        <handler-class>org.apache.shiro.web.faces.tags.HasPermissionTag</handler-class>
-        <attribute>
-            <name>name</name>
-            <description></description>
-            <required>true</required>
-        </attribute>
-    </tag>
-
-    <tag>
-        <tag-name>hasRole</tag-name>
-        <handler-class>org.apache.shiro.web.faces.tags.HasRoleTag</handler-class>
-        <attribute>
-            <name>name</name>
-            <description></description>
-            <required>true</required>
-        </attribute>
-    </tag>
-
-    <tag>
-        <tag-name>lacksPermission</tag-name>
-        <handler-class>org.apache.shiro.web.faces.tags.LacksPermissionTag</handler-class>
-        <attribute>
-            <name>name</name>
-            <description></description>
-            <required>true</required>
-        </attribute>
-    </tag>
-
-    <tag>
-        <tag-name>lacksRole</tag-name>
-        <handler-class>org.apache.shiro.web.faces.tags.LacksRoleTag</handler-class>
-        <attribute>
-            <name>name</name>
-            <description></description>
-            <required>true</required>
-        </attribute>
-    </tag>
-
-    <tag>
-        <tag-name>notAuthenticated</tag-name>
-        <handler-class>org.apache.shiro.web.faces.tags.NotAuthenticatedTag</handler-class>
-    </tag>
-
-    <tag>
-        <tag-name>remembered</tag-name>
-        <handler-class>org.apache.shiro.web.faces.tags.RememberedTag</handler-class>
-    </tag>
-
-    <tag>
-        <tag-name>principal</tag-name>
-        <component>
-            <component-type>org.apache.shiro.web.faces.tags.PrincipalTag</component-type>
-        </component>
-        <attribute>
-            <name>type</name>
-            <description></description>
-            <required>false</required>
-        </attribute>
-        <attribute>
-            <name>property</name>
-            <description></description>
-            <required>false</required>
-        </attribute>
-        <attribute>
-            <name>defaultValue</name>
-            <description></description>
-            <required>false</required>
-        </attribute>
-    </tag>
-
-</facelet-taglib>
-

http://git-wip-us.apache.org/repos/asf/shiro/blob/3fccc75a/support/pom.xml
----------------------------------------------------------------------
diff --git a/support/pom.xml b/support/pom.xml
index 001f8a6..e753d60 100644
--- a/support/pom.xml
+++ b/support/pom.xml
@@ -35,7 +35,6 @@
         <module>aspectj</module>
         <module>ehcache</module>
         <module>hazelcast</module>
-        <module>faces</module>
         <module>quartz</module>
         <module>spring</module>
         <module>guice</module>


[7/8] shiro git commit: Updated parent pom dependencies and plugin versions

Posted by bd...@apache.org.
Updated parent pom dependencies and plugin versions


Project: http://git-wip-us.apache.org/repos/asf/shiro/repo
Commit: http://git-wip-us.apache.org/repos/asf/shiro/commit/42e3b51a
Tree: http://git-wip-us.apache.org/repos/asf/shiro/tree/42e3b51a
Diff: http://git-wip-us.apache.org/repos/asf/shiro/diff/42e3b51a

Branch: refs/heads/master
Commit: 42e3b51ad698cfe9519853f3617a9484db210ee4
Parents: d44204a
Author: Brian Demers <bd...@apache.org>
Authored: Mon Nov 7 16:50:17 2016 -0500
Committer: Brian Demers <bd...@apache.org>
Committed: Mon Nov 7 16:50:17 2016 -0500

----------------------------------------------------------------------
 pom.xml                | 141 ++++++++------------------------------------
 samples/spring/pom.xml |   4 +-
 2 files changed, 28 insertions(+), 117 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/shiro/blob/42e3b51a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 7051eb8..8fe6095 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache</groupId>
         <artifactId>apache</artifactId>
-        <version>17</version>
+        <version>18</version>
     </parent>
 
     <groupId>org.apache.shiro</groupId>
@@ -51,8 +51,8 @@
         <url>http://issues.apache.org/jira/browse/SHIRO</url>
     </issueManagement>
     <ciManagement>
-        <system>Hudson</system>
-        <url>http://hudson.zones.apache.org/hudson/view/Shiro/</url>
+        <system>Jenkins</system>
+        <url>https://builds.apache.org/job/Shiro/</url>
     </ciManagement>
 
     <distributionManagement>
@@ -96,13 +96,13 @@
 
         <!-- Test 3rd-party dependencies: -->
         <easymock.version>3.4</easymock.version>
-        <gmaven.version>1.3</gmaven.version>
+        <gmaven.version>1.5</gmaven.version>
         <groovy.version>2.4.7</groovy.version>
         <junit.version>4.12</junit.version>
         <hibernate.version>4.2.21.Final</hibernate.version>
         <!-- so we can mock static methods in 3rd party libraries that sometimes don't use proper interfaces
              ahem, hazelcast, ahem... -->
-        <powermock.version>1.6.5</powermock.version>
+        <powermock.version>1.6.6</powermock.version>
 
         <maven.compiler.source>${jdk.version}</maven.compiler.source>
         <maven.compiler.target>${jdk.version}</maven.compiler.target>
@@ -225,12 +225,12 @@
                 <plugin>
                     <groupId>org.apache.felix</groupId>
                     <artifactId>maven-bundle-plugin</artifactId>
-                    <version>2.1.0</version>
+                    <version>3.2.0</version>
                 </plugin>
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-gpg-plugin</artifactId>
-                    <version>1.1</version>
+                    <version>1.6</version>
                 </plugin>
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
@@ -240,12 +240,12 @@
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-scm-publish-plugin</artifactId>
-                    <version>1.0</version>
+                    <version>1.1</version>
                 </plugin>
                 <plugin>
                     <groupId>org.apache.rat</groupId>
                     <artifactId>apache-rat-plugin</artifactId>
-                    <version>0.11</version>
+                    <version>0.12</version>
                     <configuration>
                     		<!-- note that this configuration needs to be maintain both in pluginManagement and reporting sections -->
                         <excludes>
@@ -294,105 +294,15 @@
                         </dependency>
                     </dependencies>
                 </plugin>
-                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
-                <plugin>
-                	<groupId>org.eclipse.m2e</groupId>
-                	<artifactId>lifecycle-mapping</artifactId>
-                	<version>1.0.0</version>
-                	<configuration>
-                		<lifecycleMappingMetadata>
-                			<pluginExecutions>
-                				<pluginExecution>
-                					<pluginExecutionFilter>
-                						<groupId>
-                							org.codehaus.mojo
-                						</groupId>
-                						<artifactId>
-                							aspectj-maven-plugin
-                						</artifactId>
-                						<versionRange>
-                							[1.3,)
-                						</versionRange>
-                						<goals>
-                							<goal>test-compile</goal>
-                							<goal>compile</goal>
-                						</goals>
-                					</pluginExecutionFilter>
-                					<action>
-                						<ignore />
-                					</action>
-                				</pluginExecution>
-                				<pluginExecution>
-                					<pluginExecutionFilter>
-                						<groupId>
-                							org.apache.maven.plugins
-                						</groupId>
-                						<artifactId>
-                							maven-antrun-plugin
-                						</artifactId>
-                						<versionRange>
-                							[1.3,)
-                						</versionRange>
-                						<goals>
-                							<goal>run</goal>
-                						</goals>
-                					</pluginExecutionFilter>
-                					<action>
-                						<ignore />
-                					</action>
-                				</pluginExecution>
-                				<pluginExecution>
-                					<pluginExecutionFilter>
-                						<groupId>
-                							org.codehaus.mojo
-                						</groupId>
-                						<artifactId>
-                							dependency-maven-plugin
-                						</artifactId>
-                						<versionRange>
-                							[1.0,)
-                						</versionRange>
-                						<goals>
-                							<goal>unpack</goal>
-                						</goals>
-                					</pluginExecutionFilter>
-                					<action>
-                						<ignore />
-                					</action>
-                				</pluginExecution>
-                        <pluginExecution>
-                          <pluginExecutionFilter>
-                            <groupId>
-                              org.codehaus.gmaven
-                            </groupId>
-                            <artifactId>
-                              gmaven-plugin
-                            </artifactId>
-                            <versionRange>
-                              [1.4,)
-                            </versionRange>
-                            <goals>
-                              <goal>compile</goal>
-                              <goal>testCompile</goal>
-                            </goals>
-                          </pluginExecutionFilter>
-                          <action>
-                            <ignore/>
-                          </action>
-                        </pluginExecution>
-                			</pluginExecutions>
-                		</lifecycleMappingMetadata>
-                	</configuration>
-                </plugin>
                 <plugin>
                     <groupId>org.codehaus.mojo</groupId>
                     <artifactId>build-helper-maven-plugin</artifactId>
-                    <version>1.7</version>
+                    <version>1.12</version>
                 </plugin>
                 <plugin>
-                    <groupId>org.codehaus.mojo</groupId>
-                    <artifactId>dependency-maven-plugin</artifactId>
-                    <version>1.0</version>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-dependency-plugin</artifactId>
+                    <version>2.10</version>
                 </plugin>
                 <plugin>
                     <groupId>org.jacoco</groupId>
@@ -436,7 +346,7 @@
                 <plugin>
                     <groupId>org.owasp</groupId>
                     <artifactId>dependency-check-maven</artifactId>
-                    <version>1.4.3</version>
+                    <version>1.4.4</version>
                 </plugin>
             </plugins>
         </pluginManagement>
@@ -448,7 +358,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.0.2</version>
+                <version>3.6.0</version>
                 <configuration>
                     <source>${jdk.version}</source>
                     <target>${jdk.version}</target>
@@ -565,7 +475,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-release-plugin</artifactId>
-                <version>2.5.1</version>
+                <version>2.5.3</version>
                 <configuration>
                     <!-- do not update upstream, with a pending release. -->
                     <pushChanges>false</pushChanges>
@@ -900,7 +810,7 @@
             <dependency>
                 <groupId>log4j</groupId>
                 <artifactId>log4j</artifactId>
-                <version>1.2.16</version>
+                <version>1.2.17</version>
                 <scope>test</scope>
                 <exclusions>
                     <exclusion>
@@ -1107,6 +1017,7 @@
                 <version>${spring-boot.version}</version>
             </dependency>
 
+            <!-- Guice -->
             <dependency>
                 <groupId>com.google.inject</groupId>
                 <artifactId>guice</artifactId>
@@ -1153,7 +1064,7 @@
         <plugins>
             <plugin>
                 <artifactId>maven-javadoc-plugin</artifactId>
-                <version>2.8.1</version>
+                <version>2.9.1</version>
                 <configuration>
                     <source>${jdk.version}</source>
                     <encoding>${project.build.sourceEncoding}</encoding>
@@ -1196,14 +1107,14 @@
             </plugin>
             <plugin>
                 <artifactId>maven-jxr-plugin</artifactId>
-                <version>2.1</version>
+                <version>2.5</version>
                 <configuration>
                     <aggregate>true</aggregate>
                 </configuration>
             </plugin>
             <plugin>
                 <artifactId>maven-pmd-plugin</artifactId>
-                <version>2.5</version>
+                <version>3.7</version>
                 <configuration>
                     <sourceEncoding>utf-8</sourceEncoding>
                     <targetJdk>1.5</targetJdk>
@@ -1211,7 +1122,7 @@
             </plugin>
             <plugin>
                 <artifactId>maven-project-info-reports-plugin</artifactId>
-                <version>2.2</version>
+                <version>2.9</version>
                 <!-- Disable, just to make it go faster -->
                 <configuration>
                     <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
@@ -1220,7 +1131,7 @@
             <plugin>
                 <groupId>org.apache.rat</groupId>
                 <artifactId>apache-rat-plugin</artifactId>
-                <version>0.11</version>
+                <version>0.12</version>
                 <!-- only run at the root -->
                 <inherited>false</inherited>
                 <configuration>
@@ -1278,7 +1189,7 @@
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>jdepend-maven-plugin</artifactId>
-                <version>2.0-beta-2</version>
+                <version>2.0</version>
             </plugin>
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
@@ -1319,7 +1230,7 @@
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-javadoc-plugin</artifactId>
-                        <version>2.8.1</version>
+                        <version>2.9.1</version>
                         <executions>
                             <execution>
                                 <id>attach-api-docs</id>
@@ -1333,7 +1244,7 @@
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-source-plugin</artifactId>
-                        <version>2.2.1</version>
+                        <version>3.0.1</version>
                         <executions>
                             <execution>
                                 <id>attach-sources</id>

http://git-wip-us.apache.org/repos/asf/shiro/blob/42e3b51a/samples/spring/pom.xml
----------------------------------------------------------------------
diff --git a/samples/spring/pom.xml b/samples/spring/pom.xml
index 30361fa..d5257c4 100644
--- a/samples/spring/pom.xml
+++ b/samples/spring/pom.xml
@@ -70,8 +70,8 @@
                 </dependencies>
             </plugin>
             <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>dependency-maven-plugin</artifactId>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
                 <executions>
                     <execution>
                         <phase>generate-resources</phase>