Skip to content

Commit

Permalink
Move "related links" sections out of markdown and into a new layout t…
Browse files Browse the repository at this point in the history
…emplate
  • Loading branch information
bdemers committed Oct 24, 2016
1 parent c4731cd commit 06f5343
Show file tree
Hide file tree
Showing 17 changed files with 256 additions and 288 deletions.
10 changes: 5 additions & 5 deletions assets/js/shiro-site.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ function addPageEditLink() {
var ghEditPageElement = $( "#ghEditPage" );
var editThisPageElement = $(".editThisPage");

if (ghEditPageElement && ghEditPageElement.val() && editThisPageElement) {
var relGHPage = ghEditPageElement.val();
if (ghEditPageElement && ghEditPageElement.val() && editThisPageElement) {
var relGHPage = ghEditPageElement.val();

var ghEditHref = ghRelHref + relGHPage;
editThisPageElement.append("<a href='" + ghEditHref + "'>Edit this Page on Github</a>");
}
var ghEditHref = ghRelHref + relGHPage;
editThisPageElement.append("<a href='" + ghEditHref + "'>Edit this Page on Github</a>");
}
}
25 changes: 0 additions & 25 deletions authentication-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,6 @@ The Shiro framework is designed to make authentication as clean and intuitive as

## Features

<table align="right" width="275" style="margin-left: 20px; margin-bottom: 20px; border-style: solid; border-width: 2px; border-color: navy" cellpadding="10px">

<tr>
<td>
<div id="border">
<h2>Related Content</h2>

<h3><a href="java-authentication-guide.html">Java Authentication Guide</a></h3>
<p>Learn how Authentication in Java is performed in Shiro. </br><span style="font-size:11"><a href="java-authentication-guide.html">Read More &gt;&gt;</a></span></p>

<h3><a href="authentication.html">Authentication Docs</a></h3>
<p>Full documentation on Shiro's Authentication functionality. </br><span style="font-size:11"><a href="authentication.html">Read More &gt;&gt;</a></span></p>

<h3><a href="get-started.html">Getting Started</a></h3>
<p>Resources, guides and tutorials for new Shiro users. </br><span style="font-size:11"><a href="get-started.html">Read More &gt;&gt;</a></span></p>

<h3><a href="webapp-tutorial.html">Web App Tutorial</a></h3>
<p>Step-by-step tutorial for securing a web application with Shiro. </br><span style="font-size:11"><a href="webapp-tutorial.html">Read More &gt;&gt;</a></span></p>

</div>
</td>
</tr>
</table>


* **Subject Based** - Almost everything you do in Shiro is based on the currently executing user, called a Subject. And you can easily retrieve the Subject anywhere in your code. This makes it easier for you to understand and work with Shiro in your applications.

* **Single Method call** - The authentication process is a single method call. Needing only one method call keeps the API simple and your application code clean, saving you time and effort.
Expand Down
24 changes: 0 additions & 24 deletions authorization-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,6 @@ Authorization is a critical element of any application but it can quickly become

## Features

<table align="right" width="275" style="margin-left: 20px; margin-bottom: 20px; border-style: solid; border-width: 2px; border-color: navy" cellpadding="10px">

<tr>
<td>
<div id="border">
<h2>Related Content</h2>

<h3><a href="java-authorization-guide.html">Java Authorization Guide</a></h3>
<p>Learn how Shiro handles access control in Java. </br><span style="font-size:11"><a href="java-authorization-guide.html">Read More &gt;&gt;</a></span></p>

<h3><a href="authorization.html">Authorization Docs</a></h3>
<p>Full documentation on Apache Shiro's Authorization functionality. </br><span style="font-size:11"><a href="authorization.html">Read More &gt;&gt;</a></span></p>

<h3><a href="get-started.html">Getting Started</a></h3>
<p>Resources, guides and tutorials for new Shiro users. </br><span style="font-size:11"><a href="get-started.html">Read More &gt;&gt;</a></span></p>

<h3><a href="webapp-tutorial.html">Web App Tutorial</a></h3>
<p>Step-by-step tutorial for securing a web application with Shiro. </br><span style="font-size:11"><a href="webapp-tutorial.html">Read More &gt;&gt;</a></span></p>

</div>
</td>
</tr>
</table>

* **Subject-based** - Almost everything you do in Shiro is based on the currently executing user, called a Subject. And you can easily access the subject retrieve the Subject and checks its roles, permissions, or other relevant attributes anywhere in your code. This makes it easier for you to understand and work with Shiro in your applications.

* **Checks based on roles or permissions** - Since the complexity of authorization differs greatly between applications, Shiro is designed to be flexible, supporting both role-based security and permission-based security based on your projects needs.
Expand Down
10 changes: 0 additions & 10 deletions cas.md.vtl
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@ Integrating Apache Shiro with CAS SSO server

#warning('NOTE:', 'Shiro-CAS support is deprecated, support has been moved to the Apache Shiro based <a href="https://github.com/bujiio/buji-pac4j">buji-pac4j</a> project.')

<table align="right" width="275" style="margin-left: 20px; margin-bottom: 20px; border-style: solid; border-width: 2px; border-color: navy" cellpadding="10px"><tbody><tr><td>
<div id="border">

<h2>Related Content</h2>
<h3><a href="web-features.html">Web Apps with Shiro</a></h3>
<p>Learn more about integrating Shiro into web applications. <br><span style="font-size:11"><a href="web-features.html">Read More &gt;&gt;</a></span></p>

</div>
</td></tr></tbody></table>

The _shiro-cas_ module is made to protect a web application with a [Jasig CAS](https://wiki.jasig.org/display/CAS/Home) SSO server. It enables a Shiro-enabled application to be a CAS client.

<a name="CAS-BasicunderstandingoftheCASprotocol"></a>
Expand Down
217 changes: 211 additions & 6 deletions config.scms.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,242 @@ scms {
// year = Calendar.getInstance.get(Calendar.YEAR)
//}

// [title: 'title', href: 'href', brief: 'brief'],



gettingStartedLink = [title: 'Getting Started', href: 'get-started.html', brief: 'Resources, guides and tutorials for new Shiro users.']
tenMinuiteTutorialLink = [title: '10-Minute Shiro Tutorial', href: '10-minute-tutorial.html', brief: 'Try Apache Shiro for yourself in under 10 minutes.']
webAppTutorialLink = [title: 'Web App Tutorial', href: 'webapp-tutorial.html', brief: 'Step-by-step tutorial for securing a web application with Shiro.']
authcGuideLink = [title: 'Java Authentication Guide', href: 'java-authentication-guide.html', brief: 'Learn how Authentication in Java is performed in Shiro.']
authzGuideLink = [title: 'Java Authorization Guide', href: 'java-authorization-guide.html', brief: 'Learn how Shiro handles access control in Java.']
webLink = [title: 'Web Apps with Shiro', href: 'web.html', brief: 'Detailed support for integrating Shiro into web applications.']
webFeaturesLink = [title: 'Web Apps with Shiro', href: 'web-features.html', brief: 'Learn more about integrating Shiro into web applications.']
authzDocs = [title: 'Authorization Docs', href: 'authorization.html', brief: 'Full documentation on Apache Shiro\'s Authorization functionality.']
authcDocs = [title: 'Authentication Docs', href: 'authentication.html', brief: 'Full documentation on Shiro\'s Authentication functionality.']



authcGuideRelatedLinks = [
[title: 'Authentication Features', href: 'authentication-features.html', brief: 'Quick overview of easy, subject-based authentication in Shiro.'],
authcDocs,
tenMinuiteTutorialLink,
webAppTutorialLink
]

authcFeaturesRelatedLinks = [
authcGuideLink,
authcDocs,
gettingStartedLink,
webAppTutorialLink
]


authzFeaturesRelatedLinks = [
authzGuideLink,
authzDocs,
gettingStartedLink,
webAppTutorialLink
]

casRelatedLinks = [
webFeaturesLink
]

authzGuideRelatedLinks = [
[title: 'Authorization Features', href: 'authorization-features.html', brief: 'Quick overview of permissions, roles, and users in Shiro.'],
[title: 'Authorization Docs', href: 'authorization.html', brief: 'Full documentation on Apache Shiro\'s Authorization functionality.'],
gettingStartedLink,
tenMinuiteTutorialLink,
webAppTutorialLink
]

permissionsRelatedLinks = [
authzGuideLink,
webAppTutorialLink,
gettingStartedLink,
tenMinuiteTutorialLink
]
sessionManagementRelatedLinks = [
gettingStartedLink,
tenMinuiteTutorialLink,
webAppTutorialLink,
authcGuideLink,
authzGuideLink
]

springRelatedLinks = [
webLink,
webAppTutorialLink
]

tutorialRelatedLinks = [
gettingStartedLink,
tenMinuiteTutorialLink,
webAppTutorialLink,
]

webFeaturesRelatedLinks = [
webAppTutorialLink,
webLink
]

webRelatedLinks = [
webFeaturesLink,
webAppTutorialLink,
[title: 'Session Management', href: 'session-management-features.html', brief: 'Shiro enables sessions for any application environment. Learn more!'],
[title: 'Permissions', href: 'permissions.html', brief: 'Learn more about Shiro\'s powerful and intuitive permission syntax.'],
authcGuideLink,
authzGuideLink
]

patterns {

'static/**/*.html' {
template = 'templates/none.vtl'
'**/web.md.vtl' {
template = 'templates/default.vtl'
model {
//the above template uses the year for a copyright notice:
year = Calendar.getInstance().get(Calendar.YEAR)
layout = 'templates/layouts/related.vtl'
relatedLinks = webRelatedLinks
topSpacing = '60px'
}
}

'**/*.html' {
'**/web-features.md' {
template = 'templates/default.vtl'
model {
//the above template uses the year for a copyright notice:
year = Calendar.getInstance().get(Calendar.YEAR)
layout = 'templates/layouts/related.vtl'
relatedLinks = webFeaturesRelatedLinks

}
}

'**/*.md' {
'**/session-management.md.vtl' {
template = 'templates/default.vtl'
model {
//the above template uses the year for a copyright notice:
year = Calendar.getInstance().get(Calendar.YEAR)
layout = 'templates/layouts/related.vtl'
relatedLinks = sessionManagementRelatedLinks
topSpacing = '60px'

}
}

'**/*.vtl' {
'**/tutorial.md.vtl' {
template = 'templates/default.vtl'
model {
//the above template uses the year for a copyright notice:
year = Calendar.getInstance().get(Calendar.YEAR)
layout = 'templates/layouts/related.vtl'
relatedLinks = tutorialRelatedLinks
topSpacing = '60px'

}
}

'**/spring.md' {
template = 'templates/default.vtl'
model {
//the above template uses the year for a copyright notice:
year = Calendar.getInstance().get(Calendar.YEAR)
layout = 'templates/layouts/related.vtl'
relatedLinks = springRelatedLinks

}
}

'**/permissions.md' {
template = 'templates/default.vtl'
model {
//the above template uses the year for a copyright notice:
year = Calendar.getInstance().get(Calendar.YEAR)
layout = 'templates/layouts/related.vtl'
relatedLinks = permissionsRelatedLinks
topSpacing = '60px'

}
}

'**/java-authentication-guide.md.vtl' {
template = 'templates/default.vtl'
model {
//the above template uses the year for a copyright notice:
year = Calendar.getInstance().get(Calendar.YEAR)
layout = 'templates/layouts/related.vtl'
relatedLinks = authcGuideRelatedLinks

}
}

'**/*.md.vtl' {
'**/java-authorization-guide.md.vtl' {
template = 'templates/default.vtl'
model {
//the above template uses the year for a copyright notice:
year = Calendar.getInstance().get(Calendar.YEAR)
layout = 'templates/layouts/related.vtl'
relatedLinks = authzGuideRelatedLinks

}
}

'**/authentication-features.md' {
template = 'templates/default.vtl'
model {
//the above template uses the year for a copyright notice:
year = Calendar.getInstance().get(Calendar.YEAR)
layout = 'templates/layouts/related.vtl'
relatedLinks = authzGuideRelatedLinks

}
}

'**/authorization-features.md' {
template = 'templates/default.vtl'
model {
//the above template uses the year for a copyright notice:
year = Calendar.getInstance().get(Calendar.YEAR)
layout = 'templates/layouts/related.vtl'
relatedLinks = authcFeaturesRelatedLinks

}
}

'**/cas.md.vtl' {
template = 'templates/default.vtl'
model {
//the above template uses the year for a copyright notice:
year = Calendar.getInstance().get(Calendar.YEAR)
layout = 'templates/layouts/related.vtl'
relatedLinks = casRelatedLinks

}
}

'static/**/*.html' {
template = 'templates/none.vtl'
}

'**/*.html' {
template = 'templates/default.vtl'
model {
//the above template uses the year for a copyright notice:
year = Calendar.getInstance().get(Calendar.YEAR)
}
}

'**/*.md' {
template = 'templates/default.vtl'
model {
//the above template uses the year for a copyright notice:
year = Calendar.getInstance().get(Calendar.YEAR)
}
}

'**/*.vtl' {
template = 'templates/default.vtl'
model {
//the above template uses the year for a copyright notice:
Expand Down
19 changes: 0 additions & 19 deletions java-authentication-guide.md.vtl
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,6 @@ The goal of this guide is to walk you through how Authentication in Java is perf
Terminology you'll need
-----------------------

<table align="right" width="275" style="margin-left: 20px; margin-bottom: 20px; border-style: solid; border-width: 2px; border-color: navy" cellpadding="10px"><tr><td>
<div id="border">
<h2>Related Content</h2>

<h3><a href="authentication-features.html">Authentication Features</a></h3>
<p>Quick overview of easy, subject-based authentication in Shiro. </br><span style="font-size:11"><a href="authentication-features.html">Read More &gt;&gt;</a></span></p>

<h3><a href="authentication.html">Authentication Docs</a></h3>
<p>Full documentation on Apache Shiro's Authentication functionality. </br><span style="font-size:11"><a href="authentication.html">Read More &gt;&gt;</a></span></p>

<h3><a href="10-minute-tutorial.html">10-Minute Shiro Tutorial</a></h3>
<p>Try Apache Shiro for yourself in under 10 minutes. </br><span style="font-size:11"><a href="10-minute-tutorial.html">Read More &gt;&gt;</a></span></p>

<h3><a href="webapp-tutorial.html">Web App Tutorial</a></h3>
<p>Step-by-step tutorial for securing a web application with Shiro. </br><span style="font-size:11"><a href="webapp-tutorial.html">Read More &gt;&gt;</a></span></p>

</div>
</td></tr></table>

* **Subject** - Security specific user 'view' of an application user. It can be a human being, a third-party process, a server connecting to you application application, or even a cron job. Basically, it is anything or anyone communicating with your application.

* **Principals** - A subjects identifying attributes. First name, last name, social security number, username
Expand Down
Loading

0 comments on commit 06f5343

Please sign in to comment.