shiro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdem...@apache.org
Subject svn commit: r1750993 - in /shiro/site: publish/10-minute-tutorial.html publish/webapp-tutorial.html trunk/10-minute-tutorial.html trunk/webapp-tutorial.md
Date Fri, 01 Jul 2016 19:23:26 GMT
Author: bdemers
Date: Fri Jul  1 19:23:26 2016
New Revision: 1750993

URL: http://svn.apache.org/viewvc?rev=1750993&view=rev
Log:
SHIRO-541 webapp tutorial fixes

Modified:
    shiro/site/publish/10-minute-tutorial.html
    shiro/site/publish/webapp-tutorial.html
    shiro/site/trunk/10-minute-tutorial.html
    shiro/site/trunk/webapp-tutorial.md

Modified: shiro/site/publish/10-minute-tutorial.html
URL: http://svn.apache.org/viewvc/shiro/site/publish/10-minute-tutorial.html?rev=1750993&r1=1750992&r2=1750993&view=diff
==============================================================================
--- shiro/site/publish/10-minute-tutorial.html (original)
+++ shiro/site/publish/10-minute-tutorial.html Fri Jul  1 19:23:26 2016
@@ -141,15 +141,15 @@
 <h2><a name="10MinuteTutorial-Download"></a>Download</h2>
 
 <ol>
-    <li>Ensure you have JDK 1.5+ and Maven 2.2+ installed.</li>
+    <li>Ensure you have JDK 1.6+ and Maven 3.0.3+ installed.</li>
     <li>Download the lastest "Source Code Distribution" from the <a href="download.html" title="Download">Download</a>
-        page. In this example, we're using the 1.1.0 release distribution.
+        page. In this example, we're using the 1.2.5 release distribution.
     </li>
     <li>Unzip the source package:
         <div class="code panel" style="border-width: 1px;">
             <div class="codeContent panelContent">
 <pre class="code-java">
-&gt; unzip shiro-root-1.2.0-source-release.zip
+&gt; unzip shiro-root-1.2.5-source-release.zip
 </pre>
             </div>
         </div>
@@ -158,7 +158,7 @@
         <div class="code panel" style="border-width: 1px;">
             <div class="codeContent panelContent">
 <pre class="code-java">
-&gt; cd shiro-root-1.2.0/samples/quickstart
+&gt; cd shiro-root-1.2.5/samples/quickstart
 </pre>
             </div>
         </div>

Modified: shiro/site/publish/webapp-tutorial.html
URL: http://svn.apache.org/viewvc/shiro/site/publish/webapp-tutorial.html?rev=1750993&r1=1750992&r2=1750993&view=diff
==============================================================================
--- shiro/site/publish/webapp-tutorial.html (original)
+++ shiro/site/publish/webapp-tutorial.html Fri Jul  1 19:23:26 2016
@@ -132,7 +132,7 @@
   <li><code>src/main/webapp/index.jsp</code>: the default site index page - this merely forwards the request on to our <code>home.jsp</code> homepage.</li>
 </ul><h3>4. Run the webapp</h3><p>Now that you&rsquo;ve cloned the project, you can run the web application by executing the following on the command line:</p>
 <pre><code>$ mvn jetty:run 
-</code></pre><p>Next, open your web browser to <a href="http://localhost:8080">localhost:8080</a>, and you&rsquo;ll see the home page with a <strong>Hello, World!</strong> greeting. </p><p>Hit <code>ctl-C</code> (or <code>cmd-C</code> on a mac) to shut down the web app.</p><p><a id="step1"></a></p><h2>Step 1: Enable Shiro</h2><p>Our initial repository <code>master</code> branch is just a simple generic web application that could be used as a template for any application. Let&rsquo;s add the bare minimum to enable Shiro in the web app next.</p><p>Perform the following git checkout command to load the <code>step1</code> branch:</p>
+</code></pre><p>Next, open your web browser to <a href="http://localhost:8080">localhost:8080</a>, and you&rsquo;ll see the home page with a <strong>Hello, World!</strong> greeting. </p><p>Hit <code>ctl-C</code> to shut down the web app.</p><p><a id="step1"></a></p><h2>Step 1: Enable Shiro</h2><p>Our initial repository <code>master</code> branch is just a simple generic web application that could be used as a template for any application. Let&rsquo;s add the bare minimum to enable Shiro in the web app next.</p><p>Perform the following git checkout command to load the <code>step1</code> branch:</p>
 <pre><code>$ git checkout step1
 </code></pre><p>Checking out this branch, you will find two changes:</p>
 <ol>
@@ -141,7 +141,7 @@
 </ol><h3>1a: Add a <code>shiro.ini</code> file</h3><p>Shiro can be configured in many different ways in a web application, depending on the web and/or MVC framework you use. For example, you can configure Shiro via Spring, Guice, Tapestry, and many many more.</p><p>To keep things simple for now, we&rsquo;ll start a Shiro environment by using Shiro&rsquo;s default (and very simple) <a href="http://shiro.apache.org/configuration.html">INI-based configuration</a>.</p><p>If you checked out the <code>step1</code> branch, you&rsquo;ll see the contents of this new <code>src/main/webapp/WEB-INF/shiro.ini</code> file (header comments removed for brevity):</p>
 <pre><code>[main]
 
-# Let&#39;s use some in-memory caching to reduce the number of runtime lookups against Stormpath.
+# Let&#39;s use some in-memory caching to reduce the number of runtime lookups against a remote user store.
 # A real application might want to use a more robust caching solution (e.g. ehcache or a
 # distributed cache).  When using such caches, be aware of your cache TTL settings: too high
 # a TTL and the cache won&#39;t reflect any potential changes in Stormpath fast enough.  Too low
@@ -180,7 +180,7 @@ securityManager.cacheManager = $cacheMan
 </code></pre><p>This time, you will see log output similar to the following, indicating that Shiro is indeed running in your webapp:</p>
 <pre><code>16:04:19.807 [main] INFO  o.a.shiro.web.env.EnvironmentLoader - Starting Shiro environment initialization.
 16:04:19.904 [main] INFO  o.a.shiro.web.env.EnvironmentLoader - Shiro environment initialized in 95 ms.
-</code></pre><p>Hit <code>ctl-C</code> (or <code>cmd-C</code> on a mac) to shut down the web app.</p><p><a id="step2"></a></p><h2>Step 2: Connect to a User Store</h2><p>Perform the following git checkout command to load the <code>step2</code> branch:</p>
+</code></pre><p>Hit <code>ctl-C</code> to shut down the web app.</p><p><a id="step2"></a></p><h2>Step 2: Connect to a User Store</h2><p>Perform the following git checkout command to load the <code>step2</code> branch:</p>
 <pre><code>$ git checkout step2
 </code></pre><p>Now we have Shiro integrated and running within a webapp. But we haven&rsquo;t actually told Shiro to do anything yet!</p><p>Before we can login, or logout, or perform role-based or permission-based access control, or anything else security related, we need users!</p><p>We will need to configure Shiro to access a <em>User Store</em> of some type, so it can look up users to perform login attempts, or check roles for security decisions, etc. There are many types of user stores that any application might need to access: maybe you store users in a MySQL database, maybe in MongoDB, maybe your company stores user accounts in LDAP or Active Directory, maybe you store them in a simple file, or some other proprietary data store.</p><p>Shiro does this via what it calls a <a href="http://shiro.apache.org/architecture.html"><code>Realm</code></a>. From Shiro&rsquo;s documentation: </p>
 <blockquote><p>Realms act as the ‘bridge’ or ‘connector’ between Shiro and your application’s security data. When it comes time to actually interact with security-related data like user accounts to perform authentication (login) and authorization (access control), Shiro looks up many of these things from one or more Realms configured for an application. </p><p>In this sense a Realm is essentially a security-specific <a href="http://en.wikipedia.org/wiki/Data_access_object">DAO</a>: it encapsulates connection details for data sources and makes the associated data available to Shiro as needed. When configuring Shiro, you must specify at least one Realm to use for authentication and/or authorization. The SecurityManager may be configured with multiple Realms, but at least one is required. </p><p>Shiro provides out-of-the-box Realms to connect to a number of security data sources (aka directories) such as LDAP, relational databases (JDBC), text configuration sou
 rces like INI and properties files, and more. You can plug-in your own Realm implementations to represent custom data sources if the default Realms do not meet your needs. </p>
@@ -197,8 +197,8 @@ securityManager.cacheManager = $cacheMan
 </ol><h4>Get a Stormpath API Key</h4><p>A Stormpath API Key is required for the Stormpath Realm to communicate with Stormpath. To get a Stormpath API Key:</p>
 <ol>
   <li><p>Log in to the <a href="https://api.stormpath.com/">Stormpath Admin Console</a> using the email address and password you used to register with Stormpath.</p></li>
-  <li><p>In the top-right corner of the resulting page, visit <strong>Settings &gt; My Account</strong>.</p></li>
-  <li><p>On the Account Details page, under <strong>Security Credentials</strong>, click <strong>Create API Key</strong>.</p><p>This will generate your API Key and download it to your computer as an <code>apiKey.properties</code> file. If you open the file in a text editor, you will see something similar to the following:</p>
+  <li><p>On the middle-right the resulting page, visit <strong>API Keys: Manage API Keys</strong> in the <strong>DEVELOPER TOOLS</strong> section of the page.</p></li>
+  <li><p>On the Account Details page, in the <strong>Security Credentials</strong> section, click <strong>Create API Key</strong> under <strong>Api Keys</strong>.</p><p>This will generate your API Key and download it to your computer as an <code>apiKey.properties</code> file. If you open the file in a text editor, you will see something similar to the following:</p>
   <pre><code> apiKey.id = 144JVZINOF5EBNCMG9EXAMPLE
  apiKey.secret = lWxOiKqKPNwJmSldbiSkEbkNjgh2uRSNAb+AEXAMPLE
 </code></pre></li>
@@ -208,41 +208,44 @@ securityManager.cacheManager = $cacheMan
   <li><p>Also change the file permissions to ensure only you can read this file. For example, on *nix operating systems:</p>
   <pre><code>$ chmod go-rwx $HOME/.stormpath/apiKey.properties
 </code></pre></li>
-</ol><h4>Register the web application with Stormpath</h4><p>We have to register our web application with Stormpath to allow the app to use Stormpath for user management and authentication. You register the web app with Stormpath simply by making a REST request, <code>POST</code>ing a new Application resource to the Stormpath <code>applications</code> URL:</p>
-<pre><code>curl -X POST --user $YOUR_API_KEY_ID:$YOUR_API_KEY_SECRET \
-    -H &quot;Accept: application/json&quot; \
-    -H &quot;Content-Type: application/json&quot; \
-    -d &#39;{
-           &quot;name&quot; : &quot;Apache Shiro Tutorial Webapp&quot;
-        }&#39; \
-    &#39;https://api.stormpath.com/v1/applications?createDirectory=true&#39;
+</ol><h4>Retrieve the default Stormpath Application</h4><p>When you signed up for Stormpath, an empty application was automatically created for you. It&rsquo;s called: <code>My Application</code>.</p><p>We have to register our web application with Stormpath to allow the app to use Stormpath for user management and authentication. In order to register our web application with the <code>My Application</code> Stormpath application, we need to know some information. Fortunately, we can retrieve this information using the Stormpath API.</p><p>First, we need the location of your tenant from Stormpath. Here&rsquo;s how you get that:</p>
+<pre><code>curl -i --user $YOUR_API_KEY_ID:$YOUR_API_KEY_SECRET \
+    &#39;https://api.stormpath.com/v1/tenants/current&#39;
 </code></pre><p>where:</p>
 <ul>
   <li>$YOUR_API_KEY_ID is the apiKey.id value in apiKey.properties and</li>
-  <li>YOUR_API_KEY_SECRET is the apiKey.secret value in apiKey.properties</li>
-</ul><p>This will create your application. Here’s an example response:</p>
+  <li>$YOUR_API_KEY_SECRET is the apiKey.secret value in apiKey.properties</li>
+</ul><p>You&rsquo;ll get a response like this:</p>
+<pre><code>HTTP/1.1 302 Found
+Date: Fri, 28 Aug 2015 18:34:51 GMT
+Location: https://api.stormpath.com/v1/tenants/sOmELoNgRaNDoMIdHeRe
+Server: Apache
+Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Thu, 27-Aug-2015 18:34:52 GMT
+Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
+Content-Length: 0
+Connection: keep-alive
+</code></pre><p>Notice the <code>Location</code> header. This is the location of your Stormpath tenant. Now, we can retrieve the location of the <code>My Application</code> Stormpath application, again using the API:</p>
+<pre><code>curl -u $API_KEY_ID:$API_KEY_SECRET \
+    -H &quot;Accept: application/json&quot; \
+    &#39;$TENANT_HREF/applications?name=My%20Application&#39;
+</code></pre><p>where: </p>
+<ul>
+  <li>$YOUR_API_KEY_ID is the apiKey.id value in apiKey.properties and</li>
+  <li>$YOUR_API_KEY_SECRET is the apiKey.secret value in apiKey.properties</li>
+  <li>$TENANT_HREF is the value of the <code>Location</code> header from the previous step</li>
+</ul><p>The response from this has a lot of information in it. Here’s an example excerpt from the response:</p>
 <pre><code>{
+    ...
     &quot;href&quot;: &quot;https://api.stormpath.com/v1/applications/aLoNGrAnDoMAppIdHeRe&quot;,
-    &quot;name&quot;: &quot;Apache Shiro Tutorial Webapp&quot;,
-    &quot;description&quot;: null,
+    &quot;name&quot;: &quot;My Application&quot;,
+    &quot;description&quot;: &quot;This application was automatically created for you in Stormpath for use with our Quickstart guides(https://docs.stormpath.com). It does apply to your subscription&#39;s number of reserved applications and can be renamed or reused for your own purposes.&quot;,
     &quot;status&quot;: &quot;ENABLED&quot;,
     &quot;tenant&quot;: {
         &quot;href&quot;: &quot;https://api.stormpath.com/v1/tenants/sOmELoNgRaNDoMIdHeRe&quot;
     },
-    &quot;accounts&quot;: {
-        &quot;href&quot;: &quot;https://api.stormpath.com/v1/applications/aLoNGrAnDoMAppIdHeRe/accounts&quot;
-    },
-    &quot;groups&quot;: {
-        &quot;href&quot;: &quot;https://api.stormpath.com/v1/applications/aLoNGrAnDoMAppIdHeRe/groups&quot;
-    },
-    &quot;loginAttempts&quot;: {
-        &quot;href&quot;: &quot;https://api.stormpath.com/v1/applications/aLoNGrAnDoMAppIdHeR/loginAttempts&quot;
-    },
-    &quot;passwordResetTokens&quot;: {
-        &quot;href&quot;: &quot;https://api.stormpath.com/v1/applications/aLoNGrAnDoMAppIdHeRe/passwordResetTokens&quot;
-    } 
+    ...
 }
-</code></pre><p>Make note of the top-level <code>href</code>, e.g. <code>https://api.stormpath.com/v1/applications/$YOUR_APPLICATION_ID</code> - we will use this href in the <code>shiro.ini</code> configuration next.</p><h4>Create an application test user account</h4><p>Now that we have an application, we&rsquo;ll want to create a sample/test user for that application:</p>
+</code></pre><p>Make note of your top-level <code>href</code> from above - we will use this href in the <code>shiro.ini</code> configuration next.</p><h4>Create an application test user account</h4><p>Now that we have an application, we&rsquo;ll want to create a sample/test user for that application:</p>
 <pre><code>curl -X POST --user $YOUR_API_KEY_ID:$YOUR_API_KEY_SECRET \
     -H &quot;Accept: application/json&quot; \
     -H &quot;Content-Type: application/json&quot; \
@@ -253,8 +256,13 @@ securityManager.cacheManager = $cacheMan
            &quot;email&quot;: &quot;capt@enterprise.com&quot;,
            &quot;password&quot;:&quot;Changeme1&quot;
         }&#39; \
- &quot;https://api.stormpath.com/v1/applications/$YOUR_APPLICATION_ID/accounts&quot;
-</code></pre><p>Again, don&rsquo;t forget to change <code>$YOUR_APPLICATION_ID</code> in the URL above to match your application’s ID!</p><h3>2b: Configure the Realm in <code>shiro.ini</code></h3><p>Once you choose at least one user store to connect to for Shiro&rsquo;s needs, we&rsquo;ll need to configure a <code>Realm</code> that represents that data store and then tell the Shiro <code>SecurityManager</code> about it.</p><p>If you&rsquo;ve checked out the <code>step2</code> branch, you&rsquo;ll notice the <code>shiro.ini</code> file&rsquo;s <code>[main]</code> section now has the following additions:</p>
+ &quot;$YOUR_APPLICATION_HREF/accounts&quot;
+</code></pre><p>where:</p>
+<ul>
+  <li>$YOUR_API_KEY_ID is the apiKey.id value in apiKey.properties and</li>
+  <li>$YOUR_API_KEY_SECRET is the apiKey.secret value in apiKey.properties</li>
+  <li>$YOUR_APPLICATION_HREF is the application <code>href</code> you made note of above</li>
+</ul><p>Again, don&rsquo;t forget to change <code>$YOUR_APPLICATION_ID</code> in the URL above to match your application’s ID!</p><h3>2b: Configure the Realm in <code>shiro.ini</code></h3><p>Once you choose at least one user store to connect to for Shiro&rsquo;s needs, we&rsquo;ll need to configure a <code>Realm</code> that represents that data store and then tell the Shiro <code>SecurityManager</code> about it.</p><p>If you&rsquo;ve checked out the <code>step2</code> branch, you&rsquo;ll notice the <code>shiro.ini</code> file&rsquo;s <code>[main]</code> section now has the following additions:</p>
 <pre><code># Configure a Realm to connect to a user datastore.  In this simple tutorial, we&#39;ll just point to Stormpath since it
 # takes 5 minutes to set up:
 stormpathClient = com.stormpath.shiro.client.ClientFactory
@@ -280,7 +288,7 @@ securityManager.realm = $stormpathRealm
 <pre><code>16:08:25.466 [main] INFO  o.a.shiro.web.env.EnvironmentLoader - Starting Shiro environment initialization.
 16:08:26.201 [main] INFO  o.a.s.c.IniSecurityManagerFactory - Realms have been explicitly set on the SecurityManager instance - auto-setting of realms will not occur.
 16:08:26.201 [main] INFO  o.a.shiro.web.env.EnvironmentLoader - Shiro environment initialized in 731 ms.
-</code></pre><p>Hit <code>ctl-C</code> (or <code>cmd-C</code> on a mac) to shut down the web app.</p><p><a id="step3"></a></p><h2>Step 3: Enable Login and Logout</h2><p>Now we have users, and we can add, remove and disable them easily in a UI. Now we can start enabling features like login/logout and access control in our application.</p><p>Perform the following git checkout command to load the <code>step3</code> branch:</p>
+</code></pre><p>Hit <code>ctl-C</code> to shut down the web app.</p><p><a id="step3"></a></p><h2>Step 3: Enable Login and Logout</h2><p>Now we have users, and we can add, remove and disable them easily in a UI. Now we can start enabling features like login/logout and access control in our application.</p><p>Perform the following git checkout command to load the <code>step3</code> branch:</p>
 <pre><code>$ git checkout step3
 </code></pre><p>This checkout will load the following 2 additions:</p>
 <ul>
@@ -313,7 +321,7 @@ shiro.loginUrl = /login.jsp
   <li>There is a <code>rememberMe</code> checkbox whose &lsquo;checked&rsquo; state can be a &lsquo;truthy&rsquo; value (<code>true</code>, <code>t</code>, <code>1</code>, <code>enabled</code>, <code>y</code>, <code>yes</code>, or <code>on</code>).</li>
 </ol><p>Our login.jsp form just uses the default <code>username</code>, <code>password</code>, and <code>rememberMe</code> form field names. These names are configurable if you wish to change them - see the <a href="http://shiro.apache.org/static/current/apidocs/org/apache/shiro/web/filter/authc/FormAuthenticationFilter.html"><code>FormAuthenticationFilter</code> JavaDoc</a> for information.</p><h3>Step 3c: Run the webapp</h3><p>After making the changes as specified in Step 2b and 2c, go ahead and run the web app:</p>
 <pre><code>$ mvn jetty:run
-</code></pre><h3>Step 3d: Try to Login</h3><p>With your web browser, navigate to <a href="http://localhost:8080/login.jsp">localhost:8080/login.jsp</a> and you will see our new shiny login form.</p><p>Enter in a username and password of the account you created at the end of Step 2, and hit &lsquo;Login&rsquo;. If the login is successful, you will be directed to the home page! If the login fails, you will be shown the login page again.</p><p>Tip: If you want a successful login to redirect the user to a different page other than the home page (context path <code>/</code>), you can set the <code>authc.successUrl = /whatever</code> in the INI&rsquo;s <code>[main]</code> section.</p><p>Hit <code>ctl-C</code> (or <code>cmd-C</code> on a mac) to shut down the web app.</p><p><a id="step4"></a></p><h2>Step 4: User-specific UI changes</h2><p>It&rsquo;s usually a requirement to change a web user interface based on who the user is. We can do that easily because Shiro supports a JSP tag library 
 to do things based on the currently logged-in Subject (user).</p><p>Perform the following git checkout command to load the <code>step4</code> branch:</p>
+</code></pre><h3>Step 3d: Try to Login</h3><p>With your web browser, navigate to <a href="http://localhost:8080/login.jsp">localhost:8080/login.jsp</a> and you will see our new shiny login form.</p><p>Enter in a username and password of the account you created at the end of Step 2, and hit &lsquo;Login&rsquo;. If the login is successful, you will be directed to the home page! If the login fails, you will be shown the login page again.</p><p>Tip: If you want a successful login to redirect the user to a different page other than the home page (context path <code>/</code>), you can set the <code>authc.successUrl = /whatever</code> in the INI&rsquo;s <code>[main]</code> section.</p><p>Hit <code>ctl-C</code> to shut down the web app.</p><p><a id="step4"></a></p><h2>Step 4: User-specific UI changes</h2><p>It&rsquo;s usually a requirement to change a web user interface based on who the user is. We can do that easily because Shiro supports a JSP tag library to do things based on the current
 ly logged-in Subject (user).</p><p>Perform the following git checkout command to load the <code>step4</code> branch:</p>
 <pre><code>$ git checkout step4
 </code></pre><p>This step makes some additions to our <code>home.jsp</code> page:</p>
 <ul>
@@ -346,7 +354,7 @@ shiro.loginUrl = /login.jsp
 <pre><code>Hi jsmith! (Log out)
 </code></pre><p>Assuming &lsquo;jsmith&rsquo; is the username of the account logged in. &lsquo;Log out&rsquo; is a hyperlink to the &lsquo;/logout&rsquo; url handled by the Shiro <code>logout</code> filter.</p><p>As you can see, you can turn off or on entire page sections, features and UI components. In addition to <code>&lt;shiro:guest&gt;</code> and <code>&lt;shiro:user&gt;</code>, Shiro supports <a href="http://shiro.apache.org/web.html#Web-taglibrary">many other useful JSP tags</a> that you can use to customize the UI based on various things known about the current <code>Subject</code>.</p><h3>Step 4c: Run the webapp</h3><p>After checking out the <code>step4</code> branch, go ahead and run the web app:</p>
 <pre><code>$ mvn jetty:run
-</code></pre><p>Try visiting <a href="http://localhost:8080">localhost:8080</a> as a guest, and then login. After successful login, you will see the page content change to reflect that you&rsquo;re now a known user!</p><p>Hit <code>ctl-C</code> (or <code>cmd-C</code> on a mac) to shut down the web app.</p><p><a id="step5"></a></p><h2>Step 5: Allow Access to Only Authenticated Users</h2><p>While you can change page content based on Subject state, often times you will want to restrict entire sections of your webapp based on if someone has <strong>proven</strong> their identity (authenticated) during their current interaction with the web application.</p><p>This is especially important if a user-only section of a webapp shows sensitive information, like billing details or the ability to control other users.</p><p>Perform the following git checkout command to load the <code>step5</code> branch:</p>
+</code></pre><p>Try visiting <a href="http://localhost:8080">localhost:8080</a> as a guest, and then login. After successful login, you will see the page content change to reflect that you&rsquo;re now a known user!</p><p>Hit <code>ctl-C</code> to shut down the web app.</p><p><a id="step5"></a></p><h2>Step 5: Allow Access to Only Authenticated Users</h2><p>While you can change page content based on Subject state, often times you will want to restrict entire sections of your webapp based on if someone has <strong>proven</strong> their identity (authenticated) during their current interaction with the web application.</p><p>This is especially important if a user-only section of a webapp shows sensitive information, like billing details or the ability to control other users.</p><p>Perform the following git checkout command to load the <code>step5</code> branch:</p>
 <pre><code>$ git checkout step5
 </code></pre><p>Step 5 introduces the following 3 changes:</p>
 <ol>
@@ -355,22 +363,22 @@ shiro.loginUrl = /login.jsp
   <li>We modified the home page to change its output based on if the current <code>Subject</code> is authenticated or not.</li>
 </ol><h3>Step 5a: Add a new restricted section</h3><p>A new <code>src/main/webapp/account</code> directory was added. This directory (and all paths below it) simulates a &lsquo;private&rsquo; or &lsquo;authenticated only&rsquo; section of a website that you might want to restrict to only logged in users. The <code>src/main/webapp/account/index.jsp</code> file is just a placeholder for a simulated &lsquo;home account&rsquo; page.</p><h3>Step 5b: Configure <code>shiro.ini</code></h3><p><code>shiro.ini</code> was modified by adding the following line at the end of the <code>[urls]</code> section:</p>
 <pre><code>/account/** = authc
-</code></pre><p>This <a href="http://shiro.apache.org/web.html#Web-FilterChainDefinitions">Shiro filter chain definition</a> means &ldquo;Any requests to <code>/account</code> (or any of its sub-paths) must be authenticated&rdquo;.</p><p>But what happens if someone tries to access that path or any of its children paths?</p><p>But do you remember in Step 3 when we added the following line to the <code>[main]</code> section:</p>
+</code></pre><p>This <a href="http://shiro.apache.org/web.html#Web-FilterChainDefinitions">Shiro filter chain definition</a> means &ldquo;Any requests to <code>/account</code> (or any of its sub-paths) must be authenticated&rdquo;.</p><p>But what happens if someone tries to access that path or any of its children paths?</p><p>Do you remember in Step 3 when we added the following line to the <code>[main]</code> section:</p>
 <pre><code>shiro.loginUrl = /login.jsp
-</code></pre><p>This line automatically configured the <code>authc</code> filter with our webapp&rsquo;s login URL.</p><p>Based on this line of config, the <code>authc</code> filter is now smart enough to know that if the current Subject is not authenticated when accessing <code>/account</code>, it will automatically redirect the <code>Subject</code> to the <code>/login.jsp</code> page. After successful login, it will then automatically redirect the user back to the page they were trying to access (<code>/account</code>). Convenient!</p><h3>Step 5c: Update our home page</h3><p>The final change for Step 5 is to update the <code>/home.jsp</code> page to let the user know they can access the new part of the web site. These lines were added below the welcome message:</p>
+</code></pre><p>This line automatically configured the <code>authc</code> filter with our webapp&rsquo;s login URL.</p><p>Based on this line of config, the <code>authc</code> filter is now smart enough to know that if the current Subject is not authenticated when accessing <code>/account</code>, it will automatically redirect the <code>Subject</code> to the <code>/login.jsp</code> page. After successful login, it will then automatically redirect the user back to the page they were trying to access (<code>/account</code>). Convenient!</p><h3>Step 5c: Update our home page</h3><p>The final change for Step 5 is to update the <code>/home.jsp</code> page to let the user know they can access the new part of the web site.</p><p>These lines were added below the welcome message:</p>
 <pre><code>&lt;shiro:authenticated&gt;&lt;p&gt;Visit your &lt;a href=&quot;&lt;c:url value=&quot;/account&quot;/&gt;&quot;&gt;account page&lt;/a&gt;.&lt;/p&gt;&lt;/shiro:authenticated&gt;
 &lt;shiro:notAuthenticated&gt;&lt;p&gt;If you want to access the authenticated-only &lt;a href=&quot;&lt;c:url value=&quot;/account&quot;/&gt;&quot;&gt;account page&lt;/a&gt;,
     you will need to log-in first.&lt;/p&gt;&lt;/shiro:notAuthenticated&gt;
 </code></pre><p>The <code>&lt;shiro:authenticated&gt;</code> tag will only display the contents if the current Subject has already logged in (authenticated) during their current session. This is how the <code>Subject</code> knows they can go visit a new part of the website.</p><p>The <code>&lt;shiro:notAuthenticated&gt;</code> tag will only display the contents if the current Subject is not yet authenticated during their current session.</p><p>But did you notice that the <code>notAuthenticated</code> content still has a URL to the <code>/account</code> section? That&rsquo;s ok - our <code>authc</code> filter will handle the login-and-then-redirect flow as described above.</p><p>Fire up the webapp with the new changes and try it out!</p><h3>Step 5d: Run the webapp</h3><p>After checking out the <code>step5</code> branch, go ahead and run the web app:</p>
 <pre><code>$ mvn jetty:run
-</code></pre><p>Try visiting <a href="http://localhost:8080">localhost:8080</a>. Once there, click the new <code>/account</code> link and watch it redirect you to force you to log in. Once logged in, return to the home page and see the content change again now that you&rsquo;re authenticated. You can visit the account page and the home page as often as you want, until you log out. Nice!</p><p>Hit <code>ctl-C</code> (or <code>cmd-C</code> on a mac) to shut down the web app.</p><p><a id="step6"></a></p><h2>Step 6: Role-Based Access Control</h2><p>In addition to controlling access based on authentication, it is often a requirement to restrict access to certain parts of the application based on what role(s) are assigned to the current <code>Subject</code>.</p><p>Perform the following git checkout command to load the <code>step5</code> branch:</p>
+</code></pre><p>Try visiting <a href="http://localhost:8080">localhost:8080</a>. Once there, click the new <code>/account</code> link and watch it redirect you to force you to log in. Once logged in, return to the home page and see the content change again now that you&rsquo;re authenticated. You can visit the account page and the home page as often as you want, until you log out. Nice!</p><p>Hit <code>ctl-C</code> to shut down the web app.</p><p><a id="step6"></a></p><h2>Step 6: Role-Based Access Control</h2><p>In addition to controlling access based on authentication, it is often a requirement to restrict access to certain parts of the application based on what role(s) are assigned to the current <code>Subject</code>.</p><p>Perform the following git checkout command to load the <code>step5</code> branch:</p>
 <pre><code>$ git checkout step6
 </code></pre><h3>Step 6a: Add Roles</h3><p>In order to perform Role-Based Access Control, we need Roles to exist.</p><p>The fastest way to do that in this tutorial is to populate some Groups within Stormpath (in Stormpath, a Stormpath Group can serve the same purpose of a Role).</p><p>To do this, log in to the UI and navigate as follows:</p><p><strong>Directories &gt; Apache Shiro Tutorial Webapp Directory &gt; Groups</strong></p><p>Add the following three groups:</p>
 <ul>
   <li>Captains</li>
   <li>Officers</li>
   <li>Enlisted</li>
-</ul><p>(to keep with our Star-Trek account theme :) )</p><p>Once you&rsquo;ve created the groups, add the <code>Jean-Luc Picard</code> account to the <code>Captains</code> and <code>Officers</code> groups. You might want to create some ad-hoc accounts and add them to whatever groups you like. Make sure some of the accounts don&rsquo;t overlap groups so you can see changes based on separate Groups assigned to user accounts.</p><h3>Step 6b: RBAC Tags</h3><p>We update the <code>/home.jsp</code> page to let the user know what roles they have and which ones they don&rsquo;t. These messages are added in a new <code>&lt;h2&gt;Roles&lt;/h2&gt;</code> section of the home page:</p>
+</ul><p>(to keep with our Star-Trek account theme :) )</p><p>Once you&rsquo;ve created the groups, add the <code>Jean-Luc Picard</code> account to the <code>Captains</code> and <code>Officers</code> groups. You might want to create some ad-hoc accounts and add them to whatever groups you like. Make sure some of the accounts don&rsquo;t overlap groups so you can see changes based on separate Groups assigned to user accounts.</p><h3>Step 6b: Role Based Access Control (RBAC) Tags</h3><p>We update the <code>/home.jsp</code> page to let the user know what roles they have and which ones they don&rsquo;t. These messages are added in a new <code>&lt;h2&gt;Roles&lt;/h2&gt;</code> section of the home page:</p>
 <pre><code>&lt;h2&gt;Roles&lt;/h2&gt;
 
 &lt;p&gt;Here are the roles you have and don&#39;t have. Log out and log back in under different user
@@ -393,7 +401,7 @@ shiro.loginUrl = /login.jsp
 &lt;/p&gt;
 </code></pre><p>The <code>&lt;shiro:hasRole&gt;</code> tag will only display the contents if the current Subject has been assigned the specified role.</p><p>The <code>&lt;shiro:lacksRole&gt;</code> tag will only display the contents if the current Subject <strong>has not</strong> been assigned the specified role.</p><h3>Step 6c: RBAC filter chains</h3><p>An exercise left to the reader (not a defined step) is to create a new section of the website and restrict URL access to that section of the website based on what role is assigned to the current user.</p><p>Hint: Create a <a href="http://shiro.apache.org/web.html#Web-FilterChainDefinitions">filter chain definition</a> for that new part of the webapp using the <a href="http://shiro.apache.org/static/current/apidocs/org/apache/shiro/web/filter/authz/RolesAuthorizationFilter.html"><code>roles</code> filter</a></p><h3>Step 6d: Run the webapp</h3><p>After checking out the <code>step6</code> branch, go ahead and run the web app:</p>
 <pre><code>$ mvn jetty:run
-</code></pre><p>Try visiting <a href="http://localhost:8080">localhost:8080</a> and log in with different user accounts that are assigned different roles and watch the home page&rsquo;s <strong>Roles</strong> section content change!</p><p>Hit <code>ctl-C</code> (or <code>cmd-C</code> on a mac) to shut down the web app.</p><p><a id="step7"></a></p><h2>Step 7: Permission-Based Access Control</h2><p>Role-based access control is good for many use cases, but it suffers from one major problem: you can&rsquo;t add or delete roles at runtime. Role checks are hard-coded with role names, so if you changed the role names or role configuration, or add or remove roles, you have to go back and change your code!</p><p>Because of this, Shiro has a powerful marquis feature: built-in support for <em>permissions</em>. In Shiro, a permission is a raw statement of functionality, for example &lsquo;open a door&rsquo; &lsquo;create a blog entry&rsquo;, &lsquo;delete the <code>jsmith</code> user&rsquo;, et
 c. Permissions reflect your application&rsquo;s raw functionality, so you only need to change permission checks when you change your application&rsquo;s functionlity - not if you want to change your role or user model.</p><p>To demonstrate this, we will create some permissions and assign them to a user, and then customize our web UI based on a user&rsquo;s authorization (permissions).</p><h3>Step 7a: Add Permissions</h3><p>Shiro <code>Realm</code>s are read-only components: every data store models roles, groups, permissions, accounts, and their relationships differently, so Shiro doesn&rsquo;t have a &lsquo;write&rsquo; API to modify these resources. To modify the underlying the model objects, you just modify them directly via whatever API you desire. Your Shiro Realm then knows how to read this information and represent it in a format Shiro understands.</p><p>As such, since we&rsquo;re using Stormpath in this sample app, we&rsquo;ll assign permissions to an account and group in a S
 tormpath API-specific way.</p><p>Let&rsquo;s execute a cURL request to add some permissions to our previously created Jean-Luc Picard account. Using that account&rsquo;s <code>href</code> URL, we&rsquo;ll post some <code>apacheShiroPermissions</code> to the account via <a href="http://docs.stormpath.com/rest/product-guide/#custom-data">custom data</a>:</p>
+</code></pre><p>Try visiting <a href="http://localhost:8080">localhost:8080</a> and log in with different user accounts that are assigned different roles and watch the home page&rsquo;s <strong>Roles</strong> section content change!</p><p>Hit <code>ctl-C</code> to shut down the web app.</p><p><a id="step7"></a></p><h2>Step 7: Permission-Based Access Control</h2><p>Role-based access control is good for many use cases, but it suffers from one major problem: you can&rsquo;t add or delete roles at runtime. Role checks are hard-coded with role names, so if you changed the role names or role configuration, or add or remove roles, you have to go back and change your code!</p><p>Because of this, Shiro has a powerful marquis feature: built-in support for <em>permissions</em>. In Shiro, a permission is a raw statement of functionality, for example &lsquo;open a door&rsquo; &lsquo;create a blog entry&rsquo;, &lsquo;delete the <code>jsmith</code> user&rsquo;, etc. Permissions reflect your appli
 cation&rsquo;s raw functionality, so you only need to change permission checks when you change your application&rsquo;s functionlity - not if you want to change your role or user model.</p><p>To demonstrate this, we will create some permissions and assign them to a user, and then customize our web UI based on a user&rsquo;s authorization (permissions).</p><h3>Step 7a: Add Permissions</h3><p>Shiro <code>Realm</code>s are read-only components: every data store models roles, groups, permissions, accounts, and their relationships differently, so Shiro doesn&rsquo;t have a &lsquo;write&rsquo; API to modify these resources. To modify the underlying the model objects, you just modify them directly via whatever API you desire. Your Shiro Realm then knows how to read this information and represent it in a format Shiro understands.</p><p>As such, since we&rsquo;re using Stormpath in this sample app, we&rsquo;ll assign permissions to an account and group in a Stormpath API-specific way.</p><p>
 Let&rsquo;s execute a cURL request to add some permissions to our previously created Jean-Luc Picard account. Using that account&rsquo;s <code>href</code> URL, we&rsquo;ll post some <code>apacheShiroPermissions</code> to the account via <a href="http://docs.stormpath.com/rest/product-guide/#custom-data">custom data</a>:</p>
 <pre><code>curl -X POST --user $YOUR_API_KEY_ID:$YOUR_API_KEY_SECRET \
     -H &quot;Accept: application/json&quot; \
     -H &quot;Content-Type: application/json&quot; \
@@ -425,7 +433,7 @@ You may edit the user!
 <pre><code>&lt;shiro:lacksPermission name=&quot;user:${account.username}:edit&quot;&gt; ...
 </code></pre><p>The <code>${account.username}</code> value is interpreted at runtime and forms the final <code>user:aUsername:edit</code> value, and then the final String value is used for the permission check.</p><p>This is <em>extremely</em> powerful: you can perform permission checks based on who the current user is and <em>what is currently being interacted with</em>. These runtime-based instance-level permission checks are a foundational technique for developing highly customizable and secure applications.</p><h3>Step 7c: Run the webapp</h3><p>After checking out the <code>step7</code> branch, go ahead and run the web app:</p>
 <pre><code>$ mvn jetty:run
-</code></pre><p>Try visiting <a href="http://localhost:8080">localhost:8080</a> and log in and out of the UI with your Jean-Luc Picard account (and other accounts), and see the page output change based on what permissions are assigned (or not)!</p><p>Hit <code>ctl-C</code> (or <code>cmd-C</code> on a mac) to shut down the web app.</p><h2>Summary</h2><p>We hope you have found this introductory tutorial for Shiro-enabled webapps useful. In coming editions of this tutorial, we will cover:</p>
+</code></pre><p>Try visiting <a href="http://localhost:8080">localhost:8080</a> and log in and out of the UI with your Jean-Luc Picard account (and other accounts), and see the page output change based on what permissions are assigned (or not)!</p><p>Hit <code>ctl-C</code> to shut down the web app.</p><h2>Summary</h2><p>We hope you have found this introductory tutorial for Shiro-enabled webapps useful. In coming editions of this tutorial, we will cover:</p>
 <ul>
   <li>Plugging in different user data stores, like an RDBMS or NoSQL data store.</li>
 </ul><h3>Fixes and Pull Requests</h3><p>Please send any fixes for errata as a <a href="https://help.github.com/articles/creating-a-pull-request">GitHub Pull Request</a> to the <code>https://github.com/lhazlewood/apache-shiro-tutorial-webapp</code> repository. We appreciate it!!!</p>

Modified: shiro/site/trunk/10-minute-tutorial.html
URL: http://svn.apache.org/viewvc/shiro/site/trunk/10-minute-tutorial.html?rev=1750993&r1=1750992&r2=1750993&view=diff
==============================================================================
--- shiro/site/trunk/10-minute-tutorial.html (original)
+++ shiro/site/trunk/10-minute-tutorial.html Fri Jul  1 19:23:26 2016
@@ -63,15 +63,15 @@
 <h2><a name="10MinuteTutorial-Download"></a>Download</h2>
 
 <ol>
-    <li>Ensure you have JDK 1.5+ and Maven 2.2+ installed.</li>
+    <li>Ensure you have JDK 1.6+ and Maven 3.0.3+ installed.</li>
     <li>Download the lastest "Source Code Distribution" from the <a href="download.html" title="Download">Download</a>
-        page. In this example, we're using the 1.1.0 release distribution.
+        page. In this example, we're using the 1.2.5 release distribution.
     </li>
     <li>Unzip the source package:
         <div class="code panel" style="border-width: 1px;">
             <div class="codeContent panelContent">
 <pre class="code-java">
-&gt; unzip shiro-root-1.2.0-source-release.zip
+&gt; unzip shiro-root-1.2.5-source-release.zip
 </pre>
             </div>
         </div>
@@ -80,7 +80,7 @@
         <div class="code panel" style="border-width: 1px;">
             <div class="codeContent panelContent">
 <pre class="code-java">
-&gt; cd shiro-root-1.2.0/samples/quickstart
+&gt; cd shiro-root-1.2.5/samples/quickstart
 </pre>
             </div>
         </div>

Modified: shiro/site/trunk/webapp-tutorial.md
URL: http://svn.apache.org/viewvc/shiro/site/trunk/webapp-tutorial.md?rev=1750993&r1=1750992&r2=1750993&view=diff
==============================================================================
--- shiro/site/trunk/webapp-tutorial.md (original)
+++ shiro/site/trunk/webapp-tutorial.md Fri Jul  1 19:23:26 2016
@@ -110,7 +110,7 @@ Now that you've cloned the project, you
 
 Next, open your web browser to [localhost:8080](http://localhost:8080), and you'll see the home page with a **Hello, World!** greeting.  
 
-Hit `ctl-C` (or `cmd-C` on a mac) to shut down the web app.
+Hit `ctl-C` to shut down the web app.
 
 <a id="step1"></a>
 ## Step 1: Enable Shiro
@@ -136,7 +136,7 @@ If you checked out the `step1` branch, y
 
     [main]
     
-    # Let's use some in-memory caching to reduce the number of runtime lookups against Stormpath.
+    # Let's use some in-memory caching to reduce the number of runtime lookups against a remote user store.
     # A real application might want to use a more robust caching solution (e.g. ehcache or a
     # distributed cache).  When using such caches, be aware of your cache TTL settings: too high
     # a TTL and the cache won't reflect any potential changes in Stormpath fast enough.  Too low
@@ -190,7 +190,7 @@ This time, you will see log output simil
     16:04:19.807 [main] INFO  o.a.shiro.web.env.EnvironmentLoader - Starting Shiro environment initialization.
     16:04:19.904 [main] INFO  o.a.shiro.web.env.EnvironmentLoader - Shiro environment initialized in 95 ms.
 
-Hit `ctl-C` (or `cmd-C` on a mac) to shut down the web app.
+Hit `ctl-C` to shut down the web app.
 
 <a id="step2"></a>
 ## Step 2: Connect to a User Store
@@ -241,9 +241,9 @@ A Stormpath API Key is required for the
 
 1. Log in to the [Stormpath Admin Console](https://api.stormpath.com/) using the email address and password you used to register with Stormpath.
 
-2. In the top-right corner of the resulting page, visit **Settings > My Account**.
+2. On the middle-right the resulting page, visit **API Keys: Manage API Keys** in the **DEVELOPER TOOLS** section of the page.
 
-3. On the Account Details page, under **Security Credentials**, click **Create API Key**.
+3. On the Account Details page, in the **Security Credentials** section, click **Create API Key** under **Api Keys**.
 
     This will generate your API Key and download it to your computer as an `apiKey.properties` file. If you open the file in a text editor, you will see something similar to the following:
 
@@ -258,48 +258,60 @@ A Stormpath API Key is required for the
 
         $ chmod go-rwx $HOME/.stormpath/apiKey.properties
 
-#### Register the web application with Stormpath
+#### Retrieve the default Stormpath Application
 
-We have to register our web application with Stormpath to allow the app to use Stormpath for user management and authentication.  You register the web app with Stormpath simply by making a REST request, `POST`ing a new Application resource to the Stormpath `applications` URL:
+When you signed up for Stormpath, an empty application was automatically created for you. It's called: `My Application`.
 
-    curl -X POST --user $YOUR_API_KEY_ID:$YOUR_API_KEY_SECRET \
-        -H "Accept: application/json" \
-        -H "Content-Type: application/json" \
-        -d '{
-               "name" : "Apache Shiro Tutorial Webapp"
-            }' \
-        'https://api.stormpath.com/v1/applications?createDirectory=true'
+We have to register our web application with Stormpath to allow the app to use Stormpath for user management and authentication. In order to register our web application with the `My Application` Stormpath application, we need to know some information. Fortunately, we can retrieve this information using the Stormpath API.
+
+First, we need the location of your tenant from Stormpath. Here's how you get that:
 
+    curl -i --user $YOUR_API_KEY_ID:$YOUR_API_KEY_SECRET \
+        'https://api.stormpath.com/v1/tenants/current'
+        
 where:
 
 * $YOUR_API_KEY_ID is the apiKey.id value in apiKey.properties and
-* YOUR_API_KEY_SECRET is the apiKey.secret value in apiKey.properties
+* $YOUR_API_KEY_SECRET is the apiKey.secret value in apiKey.properties
+
+You'll get a response like this:
+
+    HTTP/1.1 302 Found
+    Date: Fri, 28 Aug 2015 18:34:51 GMT
+    Location: https://api.stormpath.com/v1/tenants/sOmELoNgRaNDoMIdHeRe
+    Server: Apache
+    Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Thu, 27-Aug-2015 18:34:52 GMT
+    Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
+    Content-Length: 0
+    Connection: keep-alive
+    
+Notice the `Location` header. This is the location of your Stormpath tenant. Now, we can retrieve the location of the `My Application` Stormpath application, again using the API:
+
+    curl -u $API_KEY_ID:$API_KEY_SECRET \
+        -H "Accept: application/json" \
+        '$TENANT_HREF/applications?name=My%20Application'
+        
+where: 
+
+* $YOUR_API_KEY_ID is the apiKey.id value in apiKey.properties and
+* $YOUR_API_KEY_SECRET is the apiKey.secret value in apiKey.properties
+* $TENANT_HREF is the value of the `Location` header from the previous step
 
-This will create your application. Here’s an example response:
+The response from this has a lot of information in it. Here’s an example excerpt from the response:
 
     {
+        ...
         "href": "https://api.stormpath.com/v1/applications/aLoNGrAnDoMAppIdHeRe",
-        "name": "Apache Shiro Tutorial Webapp",
-        "description": null,
+        "name": "My Application",
+        "description": "This application was automatically created for you in Stormpath for use with our Quickstart guides(https://docs.stormpath.com). It does apply to your subscription's number of reserved applications and can be renamed or reused for your own purposes.",
         "status": "ENABLED",
         "tenant": {
             "href": "https://api.stormpath.com/v1/tenants/sOmELoNgRaNDoMIdHeRe"
         },
-        "accounts": {
-            "href": "https://api.stormpath.com/v1/applications/aLoNGrAnDoMAppIdHeRe/accounts"
-        },
-        "groups": {
-            "href": "https://api.stormpath.com/v1/applications/aLoNGrAnDoMAppIdHeRe/groups"
-        },
-        "loginAttempts": {
-            "href": "https://api.stormpath.com/v1/applications/aLoNGrAnDoMAppIdHeR/loginAttempts"
-        },
-        "passwordResetTokens": {
-            "href": "https://api.stormpath.com/v1/applications/aLoNGrAnDoMAppIdHeRe/passwordResetTokens"
-        } 
+        ...
     }
 
-Make note of the top-level `href`, e.g. `https://api.stormpath.com/v1/applications/$YOUR_APPLICATION_ID` - we will use this href in the `shiro.ini` configuration next.
+Make note of your top-level `href` from above - we will use this href in the `shiro.ini` configuration next.
 
 #### Create an application test user account
 
@@ -315,7 +327,13 @@ Now that we have an application, we'll w
                "email": "capt@enterprise.com",
                "password":"Changeme1"
             }' \
-     "https://api.stormpath.com/v1/applications/$YOUR_APPLICATION_ID/accounts"
+     "$YOUR_APPLICATION_HREF/accounts"
+     
+where:
+
+* $YOUR_API_KEY_ID is the apiKey.id value in apiKey.properties and
+* $YOUR_API_KEY_SECRET is the apiKey.secret value in apiKey.properties
+* $YOUR_APPLICATION_HREF is the application `href` you made note of above
 
 Again, don't forget to change `$YOUR_APPLICATION_ID` in the URL above to match your application’s ID!
 
@@ -363,7 +381,7 @@ This time, you will see log output simil
     16:08:26.201 [main] INFO  o.a.s.c.IniSecurityManagerFactory - Realms have been explicitly set on the SecurityManager instance - auto-setting of realms will not occur.
     16:08:26.201 [main] INFO  o.a.shiro.web.env.EnvironmentLoader - Shiro environment initialized in 731 ms.
 
-Hit `ctl-C` (or `cmd-C` on a mac) to shut down the web app.
+Hit `ctl-C` to shut down the web app.
 
 <a id="step3"></a>
 ## Step 3: Enable Login and Logout
@@ -448,7 +466,7 @@ Enter in a username and password of the
 
 Tip: If you want a successful login to redirect the user to a different page other than the home page (context path `/`), you can set the `authc.successUrl = /whatever` in the INI's `[main]` section.
 
-Hit `ctl-C` (or `cmd-C` on a mac) to shut down the web app.
+Hit `ctl-C` to shut down the web app.
 
 <a id="step4"></a>
 ## Step 4: User-specific UI changes
@@ -520,7 +538,7 @@ After checking out the `step4` branch, g
 
 Try visiting [localhost:8080](http://localhost:8080) as a guest, and then login.  After successful login, you will see the page content change to reflect that you're now a known user!
 
-Hit `ctl-C` (or `cmd-C` on a mac) to shut down the web app.
+Hit `ctl-C` to shut down the web app.
 
 <a id="step5"></a>
 ## Step 5: Allow Access to Only Authenticated Users
@@ -554,7 +572,7 @@ This [Shiro filter chain definition](htt
 
 But what happens if someone tries to access that path or any of its children paths?
 
-But do you remember in Step 3 when we added the following line to the `[main]` section:
+Do you remember in Step 3 when we added the following line to the `[main]` section:
 
     shiro.loginUrl = /login.jsp
 
@@ -564,7 +582,9 @@ Based on this line of config, the `authc
 
 ### Step 5c: Update our home page
 
-The final change for Step 5 is to update the `/home.jsp` page to let the user know they can access the new part of the web site.  These lines were added below the welcome message:
+The final change for Step 5 is to update the `/home.jsp` page to let the user know they can access the new part of the web site.
+
+These lines were added below the welcome message:
 
     <shiro:authenticated><p>Visit your <a href="<c:url value="/account"/>">account page</a>.</p></shiro:authenticated>
     <shiro:notAuthenticated><p>If you want to access the authenticated-only <a href="<c:url value="/account"/>">account page</a>,
@@ -586,7 +606,7 @@ After checking out the `step5` branch, g
 
 Try visiting [localhost:8080](http://localhost:8080).  Once there, click the new `/account` link and watch it redirect you to force you to log in.  Once logged in, return to the home page and see the content change again now that you're authenticated.  You can visit the account page and the home page as often as you want, until you log out. Nice!
 
-Hit `ctl-C` (or `cmd-C` on a mac) to shut down the web app.
+Hit `ctl-C` to shut down the web app.
 
 <a id="step6"></a>
 ## Step 6: Role-Based Access Control
@@ -605,7 +625,7 @@ The fastest way to do that in this tutor
 
 To do this, log in to the UI and navigate as follows:
 
-**Directories > Apache Shiro Tutorial Webapp Directory > Groups**
+**Directories > My Application Directory > Groups**
 
 Add the following three groups:
 
@@ -617,7 +637,7 @@ Add the following three groups:
 
 Once you've created the groups, add the `Jean-Luc Picard` account to the `Captains` and `Officers` groups.  You might want to create some ad-hoc accounts and add them to whatever groups you like.  Make sure some of the accounts don't overlap groups so you can see changes based on separate Groups assigned to user accounts.
 
-### Step 6b:  RBAC Tags
+### Step 6b: Role Based Access Control (RBAC) Tags
 
 We update the `/home.jsp` page to let the user know what roles they have and which ones they don't.  These messages are added in a new `<h2>Roles</h2>` section of the home page:
 
@@ -660,7 +680,7 @@ After checking out the `step6` branch, g
 
 Try visiting [localhost:8080](http://localhost:8080) and log in with different user accounts that are assigned different roles and watch the home page's **Roles** section content change!
 
-Hit `ctl-C` (or `cmd-C` on a mac) to shut down the web app.
+Hit `ctl-C` to shut down the web app.
 
 <a id="step7"></a>
 ## Step 7: Permission-Based Access Control
@@ -744,7 +764,7 @@ After checking out the `step7` branch, g
 
 Try visiting [localhost:8080](http://localhost:8080) and log in and out of the UI with your Jean-Luc Picard account (and other accounts), and see the page output change based on what permissions are assigned (or not)!
 
-Hit `ctl-C` (or `cmd-C` on a mac) to shut down the web app.
+Hit `ctl-C` to shut down the web app.
 
 ## Summary
 



Mime
View raw message