shiro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1774678 - /shiro/site/publish/jaxrs.html
Date Fri, 16 Dec 2016 22:45:10 GMT
Author: bdemers
Date: Fri Dec 16 22:45:09 2016
New Revision: 1774678

Updating doc page to use dependencies macro


Modified: shiro/site/publish/jaxrs.html
--- 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>
+<div class="tab-content">
+    <div id="maven-cli" class="tab-pane fade in active">
+    <pre><code class='xml'>&lt;dependency&gt;
-    &lt;version&gt;${latestRelease}&lt;/version&gt;
+    &lt;version&gt;1.4.0-RC2&lt;/version&gt;
-    &lt;version&gt;${latestRelease}&lt;/version&gt;
+    &lt;version&gt;1.4.0-RC2&lt;/version&gt;
+    </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'
+    </div>
 <p>For information on other ways to set up the Apache Shiro Filter see the <a href="web.html">web
 <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="">Jersey</a>,
<a href="">RestEasy</a> or <a href="">Apache
CXF</a> in the <a href="">samples</a>
directory on Github.</p>
+<input type="hidden" id="ghEditPage" value=""></input>

View raw message