Skip to content

arthurgregorio/shiro-ee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to ShiroEE

ShiroEE is a simple java extension to make Apache Shiro more CDI aware and simplify the configuration processes without the use of .ini files.

This library also provide a ready to use implementation of authentication realm for simultaneously use of database and LDAP/AD mechanichs.

In your project:

Download one of the releases under the release page or just put it as da dependency in your maven project:

<dependency>
    <groupId>br.eti.arthurgregorio</groupId>
    <artifactId>shiro-ee</artifactId>
    <version>${shiroee.version}</version>
</dependency>

Quick use guide:

ShiroEE has a ready to use configuration, basically you need to tell wich type of authentication to use and wich path you want to protect with permissions or roles based authorization.

This two process are described above.

Configure authentication:

To configure the authentication process you need to create a class to tell ShiroEE wich realm they need to activate in your application. To do that, see this sample class.

Configure URL authorizations:

To configure the URL authorization of you project you just need to implement the HttpSecurityConfiguration class and with the builder class (HttpSecurityBuilder) provided by the project configure wich path's you need to protect. A sample of this process can be found here.

Project with ShiroEE:

If you want a full project where ShiroEE is configured with authentication through LDAP and Database, you can check the Library project made by me to provide a full base architecture for JEE applications.

ShiroEE properties:

First of all, you will need to provide the basic configuration to the framework by providing a file with the name of shiroee.properties in your resources folder, keep at least the minimum obligatory parameters.

url.login=/index.xhtml
url.login_success=/secured/dashboard.xhtml
url.unauthorized=/error/401.xhtml

A list of the predefined values already shipped with the framework can be seen here.