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/12/16 22:45:10 UTC

svn commit: r1774678 - /shiro/site/publish/jaxrs.html

Author: bdemers
Date: Fri Dec 16 22:45:09 2016
New Revision: 1774678

URL: http://svn.apache.org/viewvc?rev=1774678&view=rev
Log:
Updating doc page to use dependencies macro

Modified:
    shiro/site/publish/jaxrs.html

Modified: shiro/site/publish/jaxrs.html
URL: http://svn.apache.org/viewvc/shiro/site/publish/jaxrs.html?rev=1774678&r1=1774677&r2=1774678&view=diff
==============================================================================
--- shiro/site/publish/jaxrs.html (original)
+++ shiro/site/publish/jaxrs.html Fri Dec 16 22:45:09 2016
@@ -221,23 +221,35 @@
             <h1>Apache Shiro JAX-RS Support</h1>
 <p>Apache Shiro&rsquo;s JAX-RS support is built on top of the more general <a href="web.html">Servlet</a> support, and requires Shiro&rsquo;s Servlet Filter to be setup. The Servlet Filter can be setup by using Shiro&rsquo;s Servlet fragment, <code>web.xml</code> configuration, or programmatically.</p>
 <h2><a href="#dependencies" name="dependencies">Dependencies</a></h2>
-<p>Using the Servlet Fragment is easiest, simply include the dependency in your application, along with <code>shiro-jaxrs</code> for Apache Maven, this would be:</p>
-<pre><code class="xml">&lt;dependency&gt;
+<p>Include the <code>shiro-servlet-plugin</code> and <code>shiro-jaxrs</code> dependencies in you application classpath (we recomend using a tool such as Apache Maven or Gradle to manage this).</p>
+<ul class="nav nav-tabs">
+    <li class="active"><a data-toggle="tab" href="#maven-cli">Apache Maven</a></li>
+    <li><a data-toggle="tab" href="#gradle-cli">Gradle</a></li>
+</ul>
+<div class="tab-content">
+    <div id="maven-cli" class="tab-pane fade in active">
+    <pre><code class='xml'>&lt;dependency&gt;
     &lt;groupId&gt;org.apache.shiro&lt;/groupId&gt;
     &lt;artifactId&gt;shiro-servlet-plugin&lt;/artifactId&gt;
-    &lt;version&gt;${latestRelease}&lt;/version&gt;
+    &lt;version&gt;1.4.0-RC2&lt;/version&gt;
 &lt;/dependency&gt;
 &lt;dependency&gt;
     &lt;groupId&gt;org.apache.shiro&lt;/groupId&gt;
     &lt;artifactId&gt;shiro-jaxrs&lt;/artifactId&gt;
-    &lt;version&gt;${latestRelease}&lt;/version&gt;
+    &lt;version&gt;1.4.0-RC2&lt;/version&gt;
 &lt;/dependency&gt;
 </code></pre>
+    </div>
+    <div id="gradle-cli" class="tab-pane fade">
+        <pre><code class='groovy'>compile 'org.apache.shiro:shiro-servlet-plugin:1.4.0-RC2'
+compile 'org.apache.shiro:shiro-jaxrs:1.4.0-RC2'
+</code></pre>
+    </div>
+</div>
 <p>For information on other ways to set up the Apache Shiro Filter see the <a href="web.html">web documentation</a>.</p>
 <h2><a href="#configuration" name="configuration">Configuration</a></h2>
 <p>There are two basic approaches used to define the authentication and authorization for your JAX-RS resources: paths defined statically in configuration, or via annotations on your resource.</p>
 <p>If you are using <a href="guice.html">Guice</a> or <a href="spring.html">Spring</a> see those docs on how to configure Shiro.</p>
-<h3>Paths defined in <code>shiro.ini</code></h3>
 <p>Just like any other web application, your resources paths can be defined in a <code>shiro.ini</code> file. For example, to require resources under <code>/api/secured</code> to use basic authentication, your <code>[urls]</code> section would look like:</p>
 <pre><code class="ini">[urls]
 
@@ -297,6 +309,7 @@ public class ExampleApp extends Applicat
 <p>In the above example, requests to either <code>/api/shiro</code> or <code>/api/shiro/define</code> will return an HTTP status of <code>401</code> if a user is not currently logged in. A request to <code>/api/shiro/define</code> made by a user without the <code>hello:define</code> will return a <code>403</code>.</p>
 <h2><a href="#want-to-see-more-" name="want-to-see-more-">Want to see more?</a></h2>
 <p>You can find portable JAX-RS application that runs with <a href="https://jersey.java.net/">Jersey</a>, <a href="http://resteasy.jboss.org/">RestEasy</a> or <a href="https://cxf.apache.org">Apache CXF</a> in the <a href="https://github.com/apache/shiro/tree/master/samples">samples</a> directory on Github.</p>
+<input type="hidden" id="ghEditPage" value="jaxrs.md.vtl"></input>
     
 </div>