Author: bdemers
Date: Mon Jul 1 14:51:00 2019
New Revision: 1862387
URL: http://svn.apache.org/viewvc?rev=1862387&view=rev
Log:
publishing latest shiro site
Modified:
shiro/site/publish/tutorial.html
Modified: shiro/site/publish/tutorial.html
URL:
http://svn.apache.org/viewvc/shiro/site/publish/tutorial.html?rev=1862387&r1=1862386&r2=1862387&view=diff
==============================================================================
--- shiro/site/publish/tutorial.html (original)
+++ shiro/site/publish/tutorial.html Mon Jul 1 14:51:00 2019
@@ -254,7 +254,7 @@
<hr class="message-inner-separator">
<p>Apache Shiro was designed from day one to support <em>any</em>
application - from the smallest command-line applications to the largest
clustered web applications. Even though we're creating a simple app for this
tutorial, know that the same usage patterns apply no matter how your
application is created or where it is deployed.</p>
</div>
-<p>This tutorial requires Java 1.5 or later. We’ll also be using Apache
<a href="http://maven.apache.org">Maven</a> as our build tool, but of course
this is not required to use Apache Shiro. You may acquire Shiro’s .jars
and incorporate them in any way you like into your application, for example
maybe using Apache <a href="http://ant.apache.org">Ant</a> and <a
href="http://ant.apache.org/ivy">Ivy</a>.</p>
+<p>This tutorial requires Java 1.6 or later. We’ll also be using Apache
<a href="http://maven.apache.org">Maven</a> as our build tool, but of course
this is not required to use Apache Shiro. You may acquire Shiro’s .jars
and incorporate them in any way you like into your application, for example
maybe using Apache <a href="http://ant.apache.org">Ant</a> and <a
href="http://ant.apache.org/ivy">Ivy</a>.</p>
<p>For this tutorial, please ensure that you are using Maven 2.2.1 or later.
You should be able to type <code>mvn --version</code> in a command prompt and
see something similar to the following:</p>
<p><strong>Testing Maven Installation</strong></p>
<pre><code class="bash">hazlewood:~/shiro-tutorial$ mvn --version
@@ -287,10 +287,10 @@ OS name: "mac os x" version: &
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.2</version>
+ <version>3.8.0</version>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <source>1.6</source>
+ <target>1.6</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
@@ -320,14 +320,20 @@ OS name: "mac os x" version: &
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
- <version>1.1.0</version>
+ <version>1.4.1</version>
</dependency>
<!-- Shiro uses SLF4J for logging. We'll use the
'simple' binding
in this example app. See http://www.slf4j.org for more info.
-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
- <version>1.6.1</version>
+ <version>1.7.21</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>1.7.21</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -418,7 +424,7 @@ admin = *
schwartz = lightsaber:*
goodguy = winnebago:drive:eagle5
</code></pre>
-<p>As you see, this configuration basically sets up a small set of static user
accounts, good enough for our first application. In later chapters, you will
see how we can use more complex User data sources like relational databases,
LDAP an ActiveDirectory, and more.</p>
+<p>As you see, this configuration basically sets up a small set of static user
accounts, good enough for our first application. In later chapters, you will
see how we can use more complex User data sources like relational databases,
LDAP and ActiveDirectory, and more.</p>
<a name="Tutorial-ReferencingtheConfiguration"></a>
<h4><a href="#referencing-the-configuration"
name="referencing-the-configuration">Referencing the Configuration</a></h4>
<p>Now that we have an INI file defined, we can create the
<code>SecurityManager</code> instance in our Tutorial application class. Change
the <code>main</code> method to reflect the following updates:</p>
@@ -515,7 +521,7 @@ log.info( "User [" + currentUs
}
</code></pre>
<p>We can also see if they have a permission to act on a certain type of
entity:</p>
-<pre><code class="java">if ( currentUser.isPermitted(
"lightsaber:weild" ) ) {
+<pre><code class="java">if ( currentUser.isPermitted(
"lightsaber:wield" ) ) {
log.info("You may use a lightsaber ring. Use it wisely.");
} else {
log.info("Sorry, lightsaber rings are for schwartz masters
only.");
@@ -601,7 +607,7 @@ public class Tutorial {
}
//test a typed permission (not instance-level)
- if (currentUser.isPermitted("lightsaber:weild")) {
+ if (currentUser.isPermitted("lightsaber:wield")) {
log.info("You may use a lightsaber ring. Use it
wisely.");
} else {
log.info("Sorry, lightsaber rings are for schwartz masters
only.");