Commit c1a53f13fe34becf82493e36c59905b364a96a40
1 parent
37ad2584
Segurança e ajustes nos pacotes
Showing
20 changed files
with
149 additions
and
352 deletions
Show diff stats
demoiselle-core/src/main/java/org/demoiselle/jee/core/interfaces/security/SecurityContext.java
| @@ -28,12 +28,6 @@ public interface SecurityContext extends Serializable { | @@ -28,12 +28,6 @@ public interface SecurityContext extends Serializable { | ||
| 28 | boolean isLoggedIn(); | 28 | boolean isLoggedIn(); |
| 29 | 29 | ||
| 30 | /** | 30 | /** |
| 31 | - * @throws NotLoggedInException if there is no user logged in a specific | ||
| 32 | - * session | ||
| 33 | - */ | ||
| 34 | - void checkLoggedIn(); | ||
| 35 | - | ||
| 36 | - /** | ||
| 37 | * Checks if the logged user has permission to execute an specific operation | 31 | * Checks if the logged user has permission to execute an specific operation |
| 38 | * on a specific resource. | 32 | * on a specific resource. |
| 39 | * | 33 | * |
| @@ -69,5 +63,5 @@ public interface SecurityContext extends Serializable { | @@ -69,5 +63,5 @@ public interface SecurityContext extends Serializable { | ||
| 69 | DemoisellePrincipal getUser(); | 63 | DemoisellePrincipal getUser(); |
| 70 | 64 | ||
| 71 | void setUser(DemoisellePrincipal loggedUser); | 65 | void setUser(DemoisellePrincipal loggedUser); |
| 72 | - | 66 | + |
| 73 | } | 67 | } |
demoiselle-core/src/main/java/org/demoiselle/jee/core/internal/producer/ResourceBundleProducer.java
| @@ -56,8 +56,8 @@ public class ResourceBundleProducer implements Serializable { | @@ -56,8 +56,8 @@ public class ResourceBundleProducer implements Serializable { | ||
| 56 | return create(baseName); | 56 | return create(baseName); |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | - @SuppressWarnings("serial") | ||
| 60 | - public static ResourceBundle create(String baseName) { | 59 | + @SuppressWarnings("serial") |
| 60 | + public static ResourceBundle create(String baseName) { | ||
| 61 | ResourceBundle bundle; | 61 | ResourceBundle bundle; |
| 62 | 62 | ||
| 63 | try { | 63 | try { |
demoiselle-parent/pom.xml
| @@ -3,6 +3,7 @@ | @@ -3,6 +3,7 @@ | ||
| 3 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | 3 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 4 | 4 | ||
| 5 | <artifactId>demoiselle-parent</artifactId> | 5 | <artifactId>demoiselle-parent</artifactId> |
| 6 | + <version>3.0.0-BETA1-SNAPSHOT</version> | ||
| 6 | <packaging>pom</packaging> | 7 | <packaging>pom</packaging> |
| 7 | <modelVersion>4.0.0</modelVersion> | 8 | <modelVersion>4.0.0</modelVersion> |
| 8 | 9 | ||
| @@ -16,6 +17,7 @@ | @@ -16,6 +17,7 @@ | ||
| 16 | 17 | ||
| 17 | <properties> | 18 | <properties> |
| 18 | <!-- General --> | 19 | <!-- General --> |
| 20 | + <demoiselle.version>3.0.0-BETA1-SNAPSHOT</demoiselle.version> | ||
| 19 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | 21 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 20 | 22 | ||
| 21 | <!-- Dependencies versions --> | 23 | <!-- Dependencies versions --> |
| @@ -37,6 +39,8 @@ | @@ -37,6 +39,8 @@ | ||
| 37 | <deltaspike.version>1.7.1</deltaspike.version> | 39 | <deltaspike.version>1.7.1</deltaspike.version> |
| 38 | <ejb.version>3.2</ejb.version> | 40 | <ejb.version>3.2</ejb.version> |
| 39 | <cache.version>1.0.0</cache.version> | 41 | <cache.version>1.0.0</cache.version> |
| 42 | + <!--Microcontainers--> | ||
| 43 | + <wildfly-swarm>2016.8</wildfly-swarm> | ||
| 40 | 44 | ||
| 41 | <!-- Maven plugin versions --> | 45 | <!-- Maven plugin versions --> |
| 42 | <maven.compiler.plugin.version>3.5.1</maven.compiler.plugin.version> | 46 | <maven.compiler.plugin.version>3.5.1</maven.compiler.plugin.version> |
| @@ -171,29 +175,29 @@ | @@ -171,29 +175,29 @@ | ||
| 171 | <dependency> | 175 | <dependency> |
| 172 | <groupId>org.demoiselle.jee</groupId> | 176 | <groupId>org.demoiselle.jee</groupId> |
| 173 | <artifactId>demoiselle-core</artifactId> | 177 | <artifactId>demoiselle-core</artifactId> |
| 174 | - <version>${project.version}</version> | 178 | + <version>${version}</version> |
| 175 | </dependency> | 179 | </dependency> |
| 176 | 180 | ||
| 177 | <dependency> | 181 | <dependency> |
| 178 | <groupId>org.demoiselle.jee</groupId> | 182 | <groupId>org.demoiselle.jee</groupId> |
| 179 | <artifactId>demoiselle-security</artifactId> | 183 | <artifactId>demoiselle-security</artifactId> |
| 180 | - <version>${project.version}</version> | 184 | + <version>${demoiselle.version}</version> |
| 181 | </dependency> | 185 | </dependency> |
| 182 | 186 | ||
| 183 | <dependency> | 187 | <dependency> |
| 184 | <groupId>org.demoiselle.jee</groupId> | 188 | <groupId>org.demoiselle.jee</groupId> |
| 185 | <artifactId>demoiselle-rest</artifactId> | 189 | <artifactId>demoiselle-rest</artifactId> |
| 186 | - <version>${project.version}</version> | 190 | + <version>${demoiselle.version}</version> |
| 187 | </dependency> | 191 | </dependency> |
| 188 | 192 | ||
| 189 | <dependency> | 193 | <dependency> |
| 190 | <groupId>org.demoiselle.jee</groupId> | 194 | <groupId>org.demoiselle.jee</groupId> |
| 191 | <artifactId>demoiselle-persistence-jpa</artifactId> | 195 | <artifactId>demoiselle-persistence-jpa</artifactId> |
| 192 | - <version>${project.version}</version> | 196 | + <version>${demoiselle.version}</version> |
| 193 | </dependency> | 197 | </dependency> |
| 194 | 198 | ||
| 195 | </dependencies> | 199 | </dependencies> |
| 196 | 200 | ||
| 197 | </dependencyManagement> | 201 | </dependencyManagement> |
| 198 | - | 202 | + |
| 199 | </project> | 203 | </project> |
demoiselle-rest/src/main/java/org/demoiselle/jee/ws/jaxrs/JaxRsFilter.java
| @@ -1,59 +0,0 @@ | @@ -1,59 +0,0 @@ | ||
| 1 | -/* | ||
| 2 | - * Demoiselle Framework | ||
| 3 | - * | ||
| 4 | - * License: GNU Lesser General Public License (LGPL), version 3 or later. | ||
| 5 | - * See the lgpl.txt file in the root directory or <https://www.gnu.org/licenses/lgpl.html>. | ||
| 6 | - */ | ||
| 7 | -package org.demoiselle.jee.ws.jaxrs; | ||
| 8 | - | ||
| 9 | -import java.util.logging.Logger; | ||
| 10 | -import javax.annotation.PostConstruct; | ||
| 11 | -import javax.inject.Inject; | ||
| 12 | -import javax.ws.rs.client.ClientRequestContext; | ||
| 13 | -import javax.ws.rs.client.ClientRequestFilter; | ||
| 14 | -import javax.ws.rs.client.ClientResponseContext; | ||
| 15 | -import javax.ws.rs.client.ClientResponseFilter; | ||
| 16 | -import javax.ws.rs.container.ContainerRequestContext; | ||
| 17 | -import javax.ws.rs.container.ContainerRequestFilter; | ||
| 18 | -import javax.ws.rs.container.ContainerResponseContext; | ||
| 19 | -import javax.ws.rs.container.ContainerResponseFilter; | ||
| 20 | -import javax.ws.rs.container.PreMatching; | ||
| 21 | -import javax.ws.rs.ext.Provider; | ||
| 22 | - | ||
| 23 | -/** | ||
| 24 | - * | ||
| 25 | - * @author 70744416353 | ||
| 26 | - */ | ||
| 27 | -@Provider | ||
| 28 | -@PreMatching | ||
| 29 | -public class JaxRsFilter implements ClientRequestFilter, ClientResponseFilter, ContainerRequestFilter, ContainerResponseFilter { | ||
| 30 | - | ||
| 31 | - @Inject | ||
| 32 | - private Logger LOG; | ||
| 33 | - | ||
| 34 | - @Override | ||
| 35 | - public void filter(ClientRequestContext requestContext) { | ||
| 36 | - } | ||
| 37 | - | ||
| 38 | - @Override | ||
| 39 | - public void filter(ClientRequestContext requestContext, ClientResponseContext responseContext) { | ||
| 40 | - } | ||
| 41 | - | ||
| 42 | - @Override | ||
| 43 | - public void filter(ContainerRequestContext requestContext) { | ||
| 44 | - } | ||
| 45 | - | ||
| 46 | - @Override | ||
| 47 | - public void filter(ContainerRequestContext requestContext, ContainerResponseContext response) { | ||
| 48 | - response.getHeaders().putSingle("Demoiselle", "3.0.0"); | ||
| 49 | - response.getHeaders().putSingle("Access-Control-Allow-Origin", "*"); | ||
| 50 | - response.getHeaders().putSingle("Access-Control-Allow-Methods", "OPTIONS, GET, POST, PUT, DELETE"); | ||
| 51 | - response.getHeaders().putSingle("Access-Control-Allow-Headers", "Content-Type"); | ||
| 52 | - } | ||
| 53 | - | ||
| 54 | - @PostConstruct | ||
| 55 | - public void init() { | ||
| 56 | - LOG.info("Demoiselle Module - Rest"); | ||
| 57 | - } | ||
| 58 | - | ||
| 59 | -} |
demoiselle-rest/src/main/java/org/demoiselle/jee/ws/jaxrs/filter/JaxRsFilter.java
0 → 100644
| @@ -0,0 +1,59 @@ | @@ -0,0 +1,59 @@ | ||
| 1 | +/* | ||
| 2 | + * Demoiselle Framework | ||
| 3 | + * | ||
| 4 | + * License: GNU Lesser General Public License (LGPL), version 3 or later. | ||
| 5 | + * See the lgpl.txt file in the root directory or <https://www.gnu.org/licenses/lgpl.html>. | ||
| 6 | + */ | ||
| 7 | +package org.demoiselle.jee.ws.jaxrs.filter; | ||
| 8 | + | ||
| 9 | +import java.util.logging.Logger; | ||
| 10 | +import javax.annotation.PostConstruct; | ||
| 11 | +import javax.inject.Inject; | ||
| 12 | +import javax.ws.rs.client.ClientRequestContext; | ||
| 13 | +import javax.ws.rs.client.ClientRequestFilter; | ||
| 14 | +import javax.ws.rs.client.ClientResponseContext; | ||
| 15 | +import javax.ws.rs.client.ClientResponseFilter; | ||
| 16 | +import javax.ws.rs.container.ContainerRequestContext; | ||
| 17 | +import javax.ws.rs.container.ContainerRequestFilter; | ||
| 18 | +import javax.ws.rs.container.ContainerResponseContext; | ||
| 19 | +import javax.ws.rs.container.ContainerResponseFilter; | ||
| 20 | +import javax.ws.rs.container.PreMatching; | ||
| 21 | +import javax.ws.rs.ext.Provider; | ||
| 22 | + | ||
| 23 | +/** | ||
| 24 | + * | ||
| 25 | + * @author 70744416353 | ||
| 26 | + */ | ||
| 27 | +@Provider | ||
| 28 | +@PreMatching | ||
| 29 | +public class JaxRsFilter implements ClientRequestFilter, ClientResponseFilter, ContainerRequestFilter, ContainerResponseFilter { | ||
| 30 | + | ||
| 31 | + @Inject | ||
| 32 | + private Logger LOG; | ||
| 33 | + | ||
| 34 | + @Override | ||
| 35 | + public void filter(ClientRequestContext requestContext) { | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + @Override | ||
| 39 | + public void filter(ClientRequestContext requestContext, ClientResponseContext responseContext) { | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + @Override | ||
| 43 | + public void filter(ContainerRequestContext requestContext) { | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + @Override | ||
| 47 | + public void filter(ContainerRequestContext requestContext, ContainerResponseContext response) { | ||
| 48 | + response.getHeaders().putSingle("Demoiselle", "3.0.0"); | ||
| 49 | + response.getHeaders().putSingle("Access-Control-Allow-Origin", "*"); | ||
| 50 | + response.getHeaders().putSingle("Access-Control-Allow-Methods", "OPTIONS, GET, POST, PUT, DELETE"); | ||
| 51 | + response.getHeaders().putSingle("Access-Control-Allow-Headers", "Content-Type"); | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + @PostConstruct | ||
| 55 | + public void init() { | ||
| 56 | + LOG.info("Demoiselle Module - Rest"); | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | +} |
demoiselle-security/pom.xml
| @@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
| 14 | <groupId>org.demoiselle.jee</groupId> | 14 | <groupId>org.demoiselle.jee</groupId> |
| 15 | <artifactId>demoiselle-parent</artifactId> | 15 | <artifactId>demoiselle-parent</artifactId> |
| 16 | <version>3.0.0-BETA1-SNAPSHOT</version> | 16 | <version>3.0.0-BETA1-SNAPSHOT</version> |
| 17 | - <relativePath>../demoiselle-parent</relativePath> | 17 | + |
| 18 | </parent> | 18 | </parent> |
| 19 | 19 | ||
| 20 | <dependencies> | 20 | <dependencies> |
demoiselle-security/src/main/java/org/demoiselle/jee/security/exception/AuthenticationException.java
| @@ -1,53 +0,0 @@ | @@ -1,53 +0,0 @@ | ||
| 1 | -/* | ||
| 2 | - * Demoiselle Framework | ||
| 3 | - * | ||
| 4 | - * License: GNU Lesser General Public License (LGPL), version 3 or later. | ||
| 5 | - * See the lgpl.txt file in the root directory or <https://www.gnu.org/licenses/lgpl.html>. | ||
| 6 | - */ | ||
| 7 | -package org.demoiselle.jee.security.exception; | ||
| 8 | - | ||
| 9 | -/** | ||
| 10 | - * <p> | ||
| 11 | - * Thrown when the mecanism responsible for the entire authentication lifecycle fails. | ||
| 12 | - * </p> | ||
| 13 | - * | ||
| 14 | - * @author SERPRO | ||
| 15 | - */ | ||
| 16 | -public class AuthenticationException extends SecurityException { | ||
| 17 | - | ||
| 18 | - private static final long serialVersionUID = 1L; | ||
| 19 | - | ||
| 20 | - /** | ||
| 21 | - * <p> | ||
| 22 | - * Constructor with message. | ||
| 23 | - * </p> | ||
| 24 | - * | ||
| 25 | - * @param message exception message | ||
| 26 | - */ | ||
| 27 | - public AuthenticationException(String message) { | ||
| 28 | - super(message); | ||
| 29 | - } | ||
| 30 | - | ||
| 31 | - /** | ||
| 32 | - * <p> | ||
| 33 | - * Constructor with the cause. | ||
| 34 | - * </p> | ||
| 35 | - * | ||
| 36 | - * @param cause exception cause | ||
| 37 | - */ | ||
| 38 | - public AuthenticationException(Throwable cause) { | ||
| 39 | - super(cause); | ||
| 40 | - } | ||
| 41 | - | ||
| 42 | - /** | ||
| 43 | - * <p> | ||
| 44 | - * Constructor with message and cause. | ||
| 45 | - * </p> | ||
| 46 | - * | ||
| 47 | - * @param message exception message | ||
| 48 | - * @param cause exception cause | ||
| 49 | - */ | ||
| 50 | - public AuthenticationException(String message, Throwable cause) { | ||
| 51 | - super(message, cause); | ||
| 52 | - } | ||
| 53 | -} |
demoiselle-security/src/main/java/org/demoiselle/jee/security/exception/AuthorizationException.java
| @@ -1,42 +0,0 @@ | @@ -1,42 +0,0 @@ | ||
| 1 | -/* | ||
| 2 | - * Demoiselle Framework | ||
| 3 | - * | ||
| 4 | - * License: GNU Lesser General Public License (LGPL), version 3 or later. | ||
| 5 | - * See the lgpl.txt file in the root directory or <https://www.gnu.org/licenses/lgpl.html>. | ||
| 6 | - */ | ||
| 7 | -package org.demoiselle.jee.security.exception; | ||
| 8 | - | ||
| 9 | -/** | ||
| 10 | - * <p> | ||
| 11 | - * Thrown when a fail on trying to access some resource and/or execute an | ||
| 12 | - * operation without the proper authorization. | ||
| 13 | - * </p> | ||
| 14 | - * | ||
| 15 | - * @author SERPRO | ||
| 16 | - */ | ||
| 17 | -public class AuthorizationException extends SecurityException { | ||
| 18 | - | ||
| 19 | - private static final long serialVersionUID = 1L; | ||
| 20 | - | ||
| 21 | - /** | ||
| 22 | - * <p> | ||
| 23 | - * Constructor with message. | ||
| 24 | - * </p> | ||
| 25 | - * | ||
| 26 | - * @param message exception message | ||
| 27 | - */ | ||
| 28 | - public AuthorizationException(String message) { | ||
| 29 | - super(message); | ||
| 30 | - } | ||
| 31 | - | ||
| 32 | - /** | ||
| 33 | - * <p> | ||
| 34 | - * Constructor with the cause. | ||
| 35 | - * </p> | ||
| 36 | - * | ||
| 37 | - * @param cause exception cause | ||
| 38 | - */ | ||
| 39 | - public AuthorizationException(Throwable cause) { | ||
| 40 | - super(cause); | ||
| 41 | - } | ||
| 42 | -} |
demoiselle-security/src/main/java/org/demoiselle/jee/security/exception/DemoiselleSecurityException.java
| @@ -22,6 +22,12 @@ public class DemoiselleSecurityException extends DemoiselleRESTException { | @@ -22,6 +22,12 @@ public class DemoiselleSecurityException extends DemoiselleRESTException { | ||
| 22 | super(string); | 22 | super(string); |
| 23 | this.statusCode = 401; | 23 | this.statusCode = 401; |
| 24 | } | 24 | } |
| 25 | + | ||
| 26 | + public DemoiselleSecurityException(String string, int statusCode) { | ||
| 27 | + super(string); | ||
| 28 | + this.statusCode = statusCode; | ||
| 29 | + } | ||
| 30 | + | ||
| 25 | 31 | ||
| 26 | public int getStatusCode() { | 32 | public int getStatusCode() { |
| 27 | return statusCode; | 33 | return statusCode; |
demoiselle-security/src/main/java/org/demoiselle/jee/security/exception/InvalidCredentialsException.java
| @@ -1,50 +0,0 @@ | @@ -1,50 +0,0 @@ | ||
| 1 | -/* | ||
| 2 | - * Demoiselle Framework | ||
| 3 | - * | ||
| 4 | - * License: GNU Lesser General Public License (LGPL), version 3 or later. | ||
| 5 | - * See the lgpl.txt file in the root directory or <https://www.gnu.org/licenses/lgpl.html>. | ||
| 6 | - */ | ||
| 7 | -package org.demoiselle.jee.security.exception; | ||
| 8 | - | ||
| 9 | -import javax.enterprise.inject.spi.CDI; | ||
| 10 | -import org.demoiselle.jee.core.annotation.literal.NameQualifier; | ||
| 11 | -import org.demoiselle.jee.core.util.ResourceBundle; | ||
| 12 | - | ||
| 13 | -/** | ||
| 14 | - * <p> | ||
| 15 | - * Thrown when the user's credentials are invalid. | ||
| 16 | - * </p> | ||
| 17 | - * | ||
| 18 | - * @author SERPRO | ||
| 19 | - */ | ||
| 20 | -public class InvalidCredentialsException extends AuthenticationException { | ||
| 21 | - | ||
| 22 | - private static final long serialVersionUID = 1L; | ||
| 23 | - | ||
| 24 | - public InvalidCredentialsException() { | ||
| 25 | - super(CDI.current().select(ResourceBundle.class, new NameQualifier("demoiselle-core-bundle")).get().getString("invalid-credentials")); | ||
| 26 | - } | ||
| 27 | - | ||
| 28 | - /** | ||
| 29 | - * <p> | ||
| 30 | - * Constructs an <code>InvalidCredentialsException</code> with a message. | ||
| 31 | - * </p> | ||
| 32 | - * | ||
| 33 | - * @param message exception message. | ||
| 34 | - */ | ||
| 35 | - public InvalidCredentialsException(String message) { | ||
| 36 | - super(message); | ||
| 37 | - } | ||
| 38 | - | ||
| 39 | - /** | ||
| 40 | - * <p> | ||
| 41 | - * Constructor with message and cause. | ||
| 42 | - * </p> | ||
| 43 | - * | ||
| 44 | - * @param message exception message. | ||
| 45 | - * @param cause exception cause. | ||
| 46 | - */ | ||
| 47 | - public InvalidCredentialsException(String message, Throwable cause) { | ||
| 48 | - super(message, cause); | ||
| 49 | - } | ||
| 50 | -} |
demoiselle-security/src/main/java/org/demoiselle/jee/security/exception/NotLoggedInException.java
| @@ -1,32 +0,0 @@ | @@ -1,32 +0,0 @@ | ||
| 1 | -/* | ||
| 2 | - * Demoiselle Framework | ||
| 3 | - * | ||
| 4 | - * License: GNU Lesser General Public License (LGPL), version 3 or later. | ||
| 5 | - * See the lgpl.txt file in the root directory or <https://www.gnu.org/licenses/lgpl.html>. | ||
| 6 | - */ | ||
| 7 | -package org.demoiselle.jee.security.exception; | ||
| 8 | - | ||
| 9 | -/** | ||
| 10 | - * <p> | ||
| 11 | - * Thrown when trying to access some resource or execute an operation that requires authentication. | ||
| 12 | - * </p> | ||
| 13 | - * | ||
| 14 | - * @author SERPRO | ||
| 15 | - */ | ||
| 16 | -public class NotLoggedInException extends DemoiselleSecurityException { | ||
| 17 | - | ||
| 18 | - private static final long serialVersionUID = 1L; | ||
| 19 | - | ||
| 20 | - /** | ||
| 21 | - * <p> | ||
| 22 | - * Constructs an <code>NotLoggedInException</code> with a message. | ||
| 23 | - * </p> | ||
| 24 | - * | ||
| 25 | - * @param message exception message | ||
| 26 | - */ | ||
| 27 | - public NotLoggedInException(String message) { | ||
| 28 | - super(message); | ||
| 29 | - } | ||
| 30 | - | ||
| 31 | - | ||
| 32 | -} |
demoiselle-security/src/main/java/org/demoiselle/jee/security/exception/SecurityException.java
| @@ -1,49 +0,0 @@ | @@ -1,49 +0,0 @@ | ||
| 1 | -/* | ||
| 2 | - * Demoiselle Framework | ||
| 3 | - * | ||
| 4 | - * License: GNU Lesser General Public License (LGPL), version 3 or later. | ||
| 5 | - * See the lgpl.txt file in the root directory or <https://www.gnu.org/licenses/lgpl.html>. | ||
| 6 | - */ | ||
| 7 | -package org.demoiselle.jee.security.exception; | ||
| 8 | - | ||
| 9 | -import org.demoiselle.jee.core.exception.DemoiselleException; | ||
| 10 | - | ||
| 11 | -/** | ||
| 12 | - * <code>SecurityException</code> is the superclass of those exceptions that can | ||
| 13 | - * be thrown due to any security related issue. | ||
| 14 | - * | ||
| 15 | - * @author SERPRO | ||
| 16 | - */ | ||
| 17 | -public class SecurityException extends DemoiselleException { | ||
| 18 | - | ||
| 19 | - private static final long serialVersionUID = 1L; | ||
| 20 | - | ||
| 21 | - /** | ||
| 22 | - * Constructs an <code>SecurityException</code> with the specified detail | ||
| 23 | - * message. | ||
| 24 | - * | ||
| 25 | - * @param message the detail message. | ||
| 26 | - */ | ||
| 27 | - SecurityException(String message) { | ||
| 28 | - super(message); | ||
| 29 | - } | ||
| 30 | - | ||
| 31 | - /** | ||
| 32 | - * Constructor with the cause. | ||
| 33 | - * | ||
| 34 | - * @param cause exception cause | ||
| 35 | - */ | ||
| 36 | - SecurityException(Throwable cause) { | ||
| 37 | - super(cause); | ||
| 38 | - } | ||
| 39 | - | ||
| 40 | - /** | ||
| 41 | - * Constructor with message and cause. | ||
| 42 | - * | ||
| 43 | - * @param message exception message | ||
| 44 | - * @param cause exception cause | ||
| 45 | - */ | ||
| 46 | - SecurityException(String message, Throwable cause) { | ||
| 47 | - super(message, cause); | ||
| 48 | - } | ||
| 49 | -} |
demoiselle-security/src/main/java/org/demoiselle/jee/security/impl/DemoisellePrincipalImpl.java
| @@ -91,7 +91,7 @@ public class DemoisellePrincipalImpl implements DemoisellePrincipal { | @@ -91,7 +91,7 @@ public class DemoisellePrincipalImpl implements DemoisellePrincipal { | ||
| 91 | 91 | ||
| 92 | @Override | 92 | @Override |
| 93 | public String toString() { | 93 | public String toString() { |
| 94 | - return "DemoisellePrincipalImpl{" + "id=" + id + ", name=" + name + ", roles=" + roles + ", permissions=" + permissions + '}'; | 94 | + return "DemoisellePrincipal{" + "id=" + id + ", name=" + name + ", roles=" + roles + ", permissions=" + permissions + '}'; |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | } | 97 | } |
demoiselle-security/src/main/java/org/demoiselle/jee/security/impl/SecurityContextImpl.java
| @@ -6,16 +6,14 @@ | @@ -6,16 +6,14 @@ | ||
| 6 | */ | 6 | */ |
| 7 | package org.demoiselle.jee.security.impl; | 7 | package org.demoiselle.jee.security.impl; |
| 8 | 8 | ||
| 9 | -import java.util.Iterator; | ||
| 10 | -import java.util.Map; | ||
| 11 | -import java.util.stream.Collectors; | ||
| 12 | import javax.enterprise.context.Dependent; | 9 | import javax.enterprise.context.Dependent; |
| 13 | import javax.inject.Inject; | 10 | import javax.inject.Inject; |
| 11 | +import javax.ws.rs.core.Response; | ||
| 14 | import org.demoiselle.jee.core.interfaces.security.DemoisellePrincipal; | 12 | import org.demoiselle.jee.core.interfaces.security.DemoisellePrincipal; |
| 15 | 13 | ||
| 16 | -import org.demoiselle.jee.security.exception.NotLoggedInException; | ||
| 17 | import org.demoiselle.jee.core.interfaces.security.SecurityContext; | 14 | import org.demoiselle.jee.core.interfaces.security.SecurityContext; |
| 18 | import org.demoiselle.jee.core.interfaces.security.TokensManager; | 15 | import org.demoiselle.jee.core.interfaces.security.TokensManager; |
| 16 | +import org.demoiselle.jee.security.exception.DemoiselleSecurityException; | ||
| 19 | import org.demoiselle.jee.security.message.DemoiselleSecurityMessages; | 17 | import org.demoiselle.jee.security.message.DemoiselleSecurityMessages; |
| 20 | 18 | ||
| 21 | /** | 19 | /** |
| @@ -33,20 +31,20 @@ public class SecurityContextImpl implements SecurityContext { | @@ -33,20 +31,20 @@ public class SecurityContextImpl implements SecurityContext { | ||
| 33 | @Inject | 31 | @Inject |
| 34 | private TokensManager tm; | 32 | private TokensManager tm; |
| 35 | 33 | ||
| 36 | - @Inject | ||
| 37 | - private DemoiselleSecurityMessages bundle; | ||
| 38 | - | ||
| 39 | /** | 34 | /** |
| 40 | * @see org.demoiselle.security.SecurityContext#hasPermission(String, | 35 | * @see org.demoiselle.security.SecurityContext#hasPermission(String, |
| 41 | * String) | 36 | * String) |
| 42 | */ | 37 | */ |
| 43 | @Override | 38 | @Override |
| 44 | public boolean hasPermission(String resource, String operation) { | 39 | public boolean hasPermission(String resource, String operation) { |
| 45 | - return (tm.getUser().getPermissions().entrySet() | 40 | + if ((tm.getUser().getPermissions().entrySet() |
| 46 | .stream() | 41 | .stream() |
| 47 | .filter(p -> p.getKey().equalsIgnoreCase(resource)) | 42 | .filter(p -> p.getKey().equalsIgnoreCase(resource)) |
| 48 | .filter(p -> p.getValue().equalsIgnoreCase(operation)) | 43 | .filter(p -> p.getValue().equalsIgnoreCase(operation)) |
| 49 | - .count() > 0); | 44 | + .count() <= 0)) { |
| 45 | + return false; | ||
| 46 | + } | ||
| 47 | + return true; | ||
| 50 | } | 48 | } |
| 51 | 49 | ||
| 52 | /** | 50 | /** |
| @@ -54,7 +52,10 @@ public class SecurityContextImpl implements SecurityContext { | @@ -54,7 +52,10 @@ public class SecurityContextImpl implements SecurityContext { | ||
| 54 | */ | 52 | */ |
| 55 | @Override | 53 | @Override |
| 56 | public boolean hasRole(String role) { | 54 | public boolean hasRole(String role) { |
| 57 | - return (tm.getUser().getRoles().parallelStream().filter(p -> p.equals(role)).count() > 0); | 55 | + if (tm.getUser().getRoles().parallelStream().filter(p -> p.equals(role)).count() <= 0) { |
| 56 | + return true; | ||
| 57 | + } | ||
| 58 | + return false; | ||
| 58 | } | 59 | } |
| 59 | 60 | ||
| 60 | /** | 61 | /** |
| @@ -62,14 +63,7 @@ public class SecurityContextImpl implements SecurityContext { | @@ -62,14 +63,7 @@ public class SecurityContextImpl implements SecurityContext { | ||
| 62 | */ | 63 | */ |
| 63 | @Override | 64 | @Override |
| 64 | public boolean isLoggedIn() { | 65 | public boolean isLoggedIn() { |
| 65 | - return tm.validate(); | ||
| 66 | - } | ||
| 67 | - | ||
| 68 | - @Override | ||
| 69 | - public void checkLoggedIn() throws NotLoggedInException { | ||
| 70 | - if (!isLoggedIn()) { | ||
| 71 | - throw new NotLoggedInException(bundle.userNotAuthenticated()); | ||
| 72 | - } | 66 | + return getUser() != null; |
| 73 | } | 67 | } |
| 74 | 68 | ||
| 75 | @Override | 69 | @Override |
demoiselle-security/src/main/java/org/demoiselle/jee/security/interceptor/LoggedInInterceptor.java
| @@ -12,8 +12,12 @@ import javax.interceptor.AroundInvoke; | @@ -12,8 +12,12 @@ import javax.interceptor.AroundInvoke; | ||
| 12 | import javax.interceptor.Interceptor; | 12 | import javax.interceptor.Interceptor; |
| 13 | import javax.interceptor.InvocationContext; | 13 | import javax.interceptor.InvocationContext; |
| 14 | import java.io.Serializable; | 14 | import java.io.Serializable; |
| 15 | +import java.util.logging.Logger; | ||
| 16 | +import javax.ws.rs.core.Response; | ||
| 15 | import org.demoiselle.jee.security.annotation.LoggedIn; | 17 | import org.demoiselle.jee.security.annotation.LoggedIn; |
| 16 | import org.demoiselle.jee.core.interfaces.security.SecurityContext; | 18 | import org.demoiselle.jee.core.interfaces.security.SecurityContext; |
| 19 | +import org.demoiselle.jee.security.exception.DemoiselleSecurityException; | ||
| 20 | +import org.demoiselle.jee.security.message.DemoiselleSecurityMessages; | ||
| 17 | 21 | ||
| 18 | /** | 22 | /** |
| 19 | * <p> | 23 | * <p> |
| @@ -32,9 +36,14 @@ public class LoggedInInterceptor implements Serializable { | @@ -32,9 +36,14 @@ public class LoggedInInterceptor implements Serializable { | ||
| 32 | @Inject | 36 | @Inject |
| 33 | private SecurityContext securityContext; | 37 | private SecurityContext securityContext; |
| 34 | 38 | ||
| 39 | + @Inject | ||
| 40 | + private DemoiselleSecurityMessages bundle; | ||
| 41 | + | ||
| 35 | @AroundInvoke | 42 | @AroundInvoke |
| 36 | public Object manage(final InvocationContext ic) throws Exception { | 43 | public Object manage(final InvocationContext ic) throws Exception { |
| 37 | - securityContext.checkLoggedIn(); | 44 | + if (!securityContext.isLoggedIn()) { |
| 45 | + throw new DemoiselleSecurityException(bundle.userNotAuthenticated(), Response.Status.UNAUTHORIZED.getStatusCode()); | ||
| 46 | + } | ||
| 38 | return ic.proceed(); | 47 | return ic.proceed(); |
| 39 | } | 48 | } |
| 40 | } | 49 | } |
demoiselle-security/src/main/java/org/demoiselle/jee/security/interceptor/RequiredPermissionInterceptor.java
| @@ -6,8 +6,6 @@ | @@ -6,8 +6,6 @@ | ||
| 6 | */ | 6 | */ |
| 7 | package org.demoiselle.jee.security.interceptor; | 7 | package org.demoiselle.jee.security.interceptor; |
| 8 | 8 | ||
| 9 | -import org.demoiselle.jee.security.exception.AuthorizationException; | ||
| 10 | - | ||
| 11 | import javax.annotation.Priority; | 9 | import javax.annotation.Priority; |
| 12 | import javax.interceptor.AroundInvoke; | 10 | import javax.interceptor.AroundInvoke; |
| 13 | import javax.interceptor.Interceptor; | 11 | import javax.interceptor.Interceptor; |
| @@ -15,12 +13,15 @@ import javax.interceptor.InvocationContext; | @@ -15,12 +13,15 @@ import javax.interceptor.InvocationContext; | ||
| 15 | import java.io.Serializable; | 13 | import java.io.Serializable; |
| 16 | import java.util.logging.Logger; | 14 | import java.util.logging.Logger; |
| 17 | import javax.inject.Inject; | 15 | import javax.inject.Inject; |
| 16 | +import javax.ws.rs.core.Response; | ||
| 18 | import org.demoiselle.jee.core.annotation.Name; | 17 | import org.demoiselle.jee.core.annotation.Name; |
| 19 | import org.demoiselle.jee.core.interfaces.security.DemoisellePrincipal; | 18 | import org.demoiselle.jee.core.interfaces.security.DemoisellePrincipal; |
| 20 | import org.demoiselle.jee.core.util.ResourceBundle; | 19 | import org.demoiselle.jee.core.util.ResourceBundle; |
| 21 | import org.demoiselle.jee.core.util.Strings; | 20 | import org.demoiselle.jee.core.util.Strings; |
| 22 | import org.demoiselle.jee.security.annotation.RequiredPermission; | 21 | import org.demoiselle.jee.security.annotation.RequiredPermission; |
| 23 | import org.demoiselle.jee.core.interfaces.security.SecurityContext; | 22 | import org.demoiselle.jee.core.interfaces.security.SecurityContext; |
| 23 | +import org.demoiselle.jee.security.exception.DemoiselleSecurityException; | ||
| 24 | +import org.demoiselle.jee.security.message.DemoiselleSecurityMessages; | ||
| 24 | 25 | ||
| 25 | /** | 26 | /** |
| 26 | * <p> | 27 | * <p> |
| @@ -43,7 +44,7 @@ public class RequiredPermissionInterceptor implements Serializable { | @@ -43,7 +44,7 @@ public class RequiredPermissionInterceptor implements Serializable { | ||
| 43 | private DemoisellePrincipal loggedUser; | 44 | private DemoisellePrincipal loggedUser; |
| 44 | 45 | ||
| 45 | @Inject | 46 | @Inject |
| 46 | - private ResourceBundle bundle; | 47 | + private DemoiselleSecurityMessages bundle; |
| 47 | 48 | ||
| 48 | @Inject | 49 | @Inject |
| 49 | private Logger logger; | 50 | private Logger logger; |
| @@ -73,15 +74,15 @@ public class RequiredPermissionInterceptor implements Serializable { | @@ -73,15 +74,15 @@ public class RequiredPermissionInterceptor implements Serializable { | ||
| 73 | 74 | ||
| 74 | if (securityContext.isLoggedIn()) { | 75 | if (securityContext.isLoggedIn()) { |
| 75 | username = loggedUser.getName(); | 76 | username = loggedUser.getName(); |
| 76 | - logger.finest(bundle.getString("access-checking", username, operation, resource)); | 77 | + logger.finest(bundle.accessCheckingPermission(username, operation, resource)); |
| 77 | } | 78 | } |
| 78 | 79 | ||
| 79 | if (securityContext.hasPermission(resource, operation)) { | 80 | if (securityContext.hasPermission(resource, operation)) { |
| 80 | - logger.severe(bundle.getString("access-denied", username, operation, resource)); | ||
| 81 | - throw new AuthorizationException(bundle.getString("access-denied-ui", resource, operation)); | 81 | + logger.severe(bundle.doesNotHavePermission(username, operation, resource)); |
| 82 | + throw new DemoiselleSecurityException(bundle.doesNotHavePermission(username, operation, resource), Response.Status.UNAUTHORIZED.getStatusCode()); | ||
| 82 | } | 83 | } |
| 83 | 84 | ||
| 84 | - logger.fine(bundle.getString("access-allowed", username, operation, resource)); | 85 | + logger.fine(bundle.accessAllowed(username, operation, resource)); |
| 85 | return ic.proceed(); | 86 | return ic.proceed(); |
| 86 | } | 87 | } |
| 87 | 88 |
demoiselle-security/src/main/java/org/demoiselle/jee/security/interceptor/RequiredRoleInterceptor.java
| @@ -6,8 +6,6 @@ | @@ -6,8 +6,6 @@ | ||
| 6 | */ | 6 | */ |
| 7 | package org.demoiselle.jee.security.interceptor; | 7 | package org.demoiselle.jee.security.interceptor; |
| 8 | 8 | ||
| 9 | -import org.demoiselle.jee.security.exception.AuthorizationException; | ||
| 10 | - | ||
| 11 | import javax.annotation.Priority; | 9 | import javax.annotation.Priority; |
| 12 | import javax.interceptor.AroundInvoke; | 10 | import javax.interceptor.AroundInvoke; |
| 13 | import javax.interceptor.Interceptor; | 11 | import javax.interceptor.Interceptor; |
| @@ -19,10 +17,13 @@ import java.util.List; | @@ -19,10 +17,13 @@ import java.util.List; | ||
| 19 | 17 | ||
| 20 | import java.util.logging.Logger; | 18 | import java.util.logging.Logger; |
| 21 | import javax.inject.Inject; | 19 | import javax.inject.Inject; |
| 20 | +import javax.ws.rs.core.Response; | ||
| 22 | import org.demoiselle.jee.core.interfaces.security.DemoisellePrincipal; | 21 | import org.demoiselle.jee.core.interfaces.security.DemoisellePrincipal; |
| 23 | import org.demoiselle.jee.core.util.ResourceBundle; | 22 | import org.demoiselle.jee.core.util.ResourceBundle; |
| 24 | import org.demoiselle.jee.security.annotation.RequiredRole; | 23 | import org.demoiselle.jee.security.annotation.RequiredRole; |
| 25 | import org.demoiselle.jee.core.interfaces.security.SecurityContext; | 24 | import org.demoiselle.jee.core.interfaces.security.SecurityContext; |
| 25 | +import org.demoiselle.jee.security.exception.DemoiselleSecurityException; | ||
| 26 | +import org.demoiselle.jee.security.message.DemoiselleSecurityMessages; | ||
| 26 | 27 | ||
| 27 | /** | 28 | /** |
| 28 | * <p> | 29 | * <p> |
| @@ -45,7 +46,7 @@ public class RequiredRoleInterceptor implements Serializable { | @@ -45,7 +46,7 @@ public class RequiredRoleInterceptor implements Serializable { | ||
| 45 | private DemoisellePrincipal loggedUser; | 46 | private DemoisellePrincipal loggedUser; |
| 46 | 47 | ||
| 47 | @Inject | 48 | @Inject |
| 48 | - private ResourceBundle bundle; | 49 | + private DemoiselleSecurityMessages bundle; |
| 49 | 50 | ||
| 50 | @Inject | 51 | @Inject |
| 51 | private Logger logger; | 52 | private Logger logger; |
| @@ -70,28 +71,26 @@ public class RequiredRoleInterceptor implements Serializable { | @@ -70,28 +71,26 @@ public class RequiredRoleInterceptor implements Serializable { | ||
| 70 | public Object manage(final InvocationContext ic) throws Exception { | 71 | public Object manage(final InvocationContext ic) throws Exception { |
| 71 | List<String> roles = getRoles(ic); | 72 | List<String> roles = getRoles(ic); |
| 72 | 73 | ||
| 74 | + String username = null; | ||
| 75 | + | ||
| 73 | if (securityContext.isLoggedIn()) { | 76 | if (securityContext.isLoggedIn()) { |
| 74 | - logger.info( | ||
| 75 | - bundle.getString("has-role-verification", loggedUser.getName(), roles)); | 77 | + username = loggedUser.getName(); |
| 76 | } | 78 | } |
| 77 | 79 | ||
| 78 | List<String> userRoles = new ArrayList<String>(); | 80 | List<String> userRoles = new ArrayList<String>(); |
| 79 | 81 | ||
| 80 | for (String role : roles) { | 82 | for (String role : roles) { |
| 81 | if (securityContext.hasRole(role)) { | 83 | if (securityContext.hasRole(role)) { |
| 84 | + logger.finest(bundle.accessCheckingRole(username, role)); | ||
| 82 | userRoles.add(role); | 85 | userRoles.add(role); |
| 83 | } | 86 | } |
| 84 | } | 87 | } |
| 85 | 88 | ||
| 86 | if (userRoles.isEmpty()) { | 89 | if (userRoles.isEmpty()) { |
| 87 | - logger.severe( | ||
| 88 | - bundle.getString("does-not-have-role", loggedUser.getName(), roles)); | ||
| 89 | - | ||
| 90 | - throw new AuthorizationException(bundle.getString("does-not-have-role-ui", roles)); | 90 | + logger.severe(bundle.doesNotHaveRole(username, roles.toString())); |
| 91 | + throw new DemoiselleSecurityException(bundle.doesNotHaveRole(username, roles.toString()), Response.Status.UNAUTHORIZED.getStatusCode()); | ||
| 91 | } | 92 | } |
| 92 | 93 | ||
| 93 | - logger.fine(bundle.getString("user-has-role", loggedUser.getName(), userRoles)); | ||
| 94 | - | ||
| 95 | return ic.proceed(); | 94 | return ic.proceed(); |
| 96 | } | 95 | } |
| 97 | 96 |
demoiselle-security/src/main/java/org/demoiselle/jee/security/message/DemoiselleSecurityMessages.java
| @@ -12,8 +12,28 @@ import org.apache.deltaspike.core.api.message.MessageTemplate; | @@ -12,8 +12,28 @@ import org.apache.deltaspike.core.api.message.MessageTemplate; | ||
| 12 | @MessageBundle | 12 | @MessageBundle |
| 13 | public interface DemoiselleSecurityMessages { | 13 | public interface DemoiselleSecurityMessages { |
| 14 | 14 | ||
| 15 | - @MessageTemplate("{user-not-authenticated}") | ||
| 16 | - String userNotAuthenticated(); | 15 | + @MessageTemplate("{access-checking-permission}") |
| 16 | + String accessCheckingPermission(String usuario, String operacao, String recurso); | ||
| 17 | 17 | ||
| 18 | + @MessageTemplate("{access-checking-role}") | ||
| 19 | + String accessCheckingRole(String usuario, String role); | ||
| 18 | 20 | ||
| 19 | -} | ||
| 20 | \ No newline at end of file | 21 | \ No newline at end of file |
| 22 | + @MessageTemplate("{access-allowed}") | ||
| 23 | + String accessAllowed(String usuario, String operacao, String recurso); | ||
| 24 | + | ||
| 25 | + @MessageTemplate("{access-denied}") | ||
| 26 | + String accessDenied(String usuario, String operacao, String recurso); | ||
| 27 | + | ||
| 28 | + @MessageTemplate("{user-not-authenticated}") | ||
| 29 | + String userNotAuthenticated(); | ||
| 30 | + | ||
| 31 | + @MessageTemplate("{invalid-credentials}") | ||
| 32 | + String invalidCredentials(); | ||
| 33 | + | ||
| 34 | + @MessageTemplate("{does-not-have-role}") | ||
| 35 | + String doesNotHaveRole(String usuario, String role); | ||
| 36 | + | ||
| 37 | + @MessageTemplate("{does-not-have-permission}") | ||
| 38 | + String doesNotHavePermission(String usuario, String operacao, String recurso); | ||
| 39 | + | ||
| 40 | +} |
demoiselle-security/src/main/resources/org/demoiselle/jee/security/message/DemoiselleSecurityMessages.properties
| 1 | -adding-message-to-context=Adicionando uma mensagem no contexto: [{0}] | ||
| 2 | -access-checking=Verificando permiss\u00e3o do usu\u00e1rio {0} para executar a a\u00e7\u00e3o {1} no recurso {2} | ||
| 3 | -access-allowed=O usu\u00e1rio {0} acessou o recurso {2} com a a\u00e7\u00e3o {1} | ||
| 4 | -access-denied=O usu\u00e1rio {0} n\u00e3o possui permiss\u00e3o para executar a a\u00e7\u00e3o {1} no recurso {2} | ||
| 5 | -access-denied-ui=Voc\u00ea n\u00e3o est\u00e1 autorizado a executar a a\u00e7\u00e3o {1} no recurso {0} | ||
| 6 | -authorizer-not-defined=Nenhuma regra de resolu\u00e7\u00e3o de permiss\u00f5es foi definida. Para utilizar @{0} \u00e9 preciso definir a propriedade frameworkdemoiselle.security.authorizer.class como regra de resolu\u00e7\u00e3o de permiss\u00f5es desejada no arquivo demoiselle.properties. | 1 | +access-checking-permission=Verificando permiss\u00e3o do usu\u00e1rio %s para executar a a\u00e7\u00e3o %s no recurso %s |
| 2 | +access-checking-role=Verificando permiss\u00e3o do usu\u00e1rio %s para a role %s | ||
| 3 | +access-allowed=O usu\u00e1rio %s acessou o recurso %s com a a\u00e7\u00e3o %s | ||
| 4 | +access-denied=O usu\u00e1rio %s n\u00e3o possui permiss\u00e3o para executar a a\u00e7\u00e3o %s no recurso %s | ||
| 7 | user-not-authenticated=Usu\u00e1rio n\u00e3o autenticado | 5 | user-not-authenticated=Usu\u00e1rio n\u00e3o autenticado |
| 8 | invalid-credentials=Usu\u00e1rio ou senha inv\u00e1lidos | 6 | invalid-credentials=Usu\u00e1rio ou senha inv\u00e1lidos |
| 9 | -has-role-verification=Verificando se o usu\u00e1rio {0} possui a(s) role(s)\: {1} | ||
| 10 | -does-not-have-role=Usu\u00e1rio {0} n\u00e3o possui a(s) role(s)\: {1} | ||
| 11 | -does-not-have-role-ui=Para acessar este recurso \u00e9 necess\u00e1rio ser {0} | ||
| 12 | -user-has-role=Usu\u00e1rio {0} possui a(s) role(s)\: {1} | ||
| 13 | \ No newline at end of file | 7 | \ No newline at end of file |
| 8 | +does-not-have-role=Usu\u00e1rio %s n\u00e3o possui a role\: %s | ||
| 9 | +does-not-have-permission=Usu\u00e1rio %s n\u00e3o possui a permiss\u00e3o para executar a a\u00e7\u00e3o %s no recurso %s |
pom.xml
| @@ -66,13 +66,13 @@ | @@ -66,13 +66,13 @@ | ||
| 66 | <modules> | 66 | <modules> |
| 67 | <module>demoiselle-parent</module> | 67 | <module>demoiselle-parent</module> |
| 68 | <module>demoiselle-core</module> | 68 | <module>demoiselle-core</module> |
| 69 | + <module>demoiselle-configuration</module> | ||
| 69 | <module>demoiselle-persistence-jpa</module> | 70 | <module>demoiselle-persistence-jpa</module> |
| 70 | <module>demoiselle-rest</module> | 71 | <module>demoiselle-rest</module> |
| 71 | <module>demoiselle-security</module> | 72 | <module>demoiselle-security</module> |
| 72 | <module>demoiselle-security-token</module> | 73 | <module>demoiselle-security-token</module> |
| 73 | <module>demoiselle-security-basic</module> | 74 | <module>demoiselle-security-basic</module> |
| 74 | <module>demoiselle-security-jwt</module> | 75 | <module>demoiselle-security-jwt</module> |
| 75 | - <module>demoiselle-configuration</module> | ||
| 76 | <!--<module>demoiselle-security-jwt</module>--> | 76 | <!--<module>demoiselle-security-jwt</module>--> |
| 77 | </modules> | 77 | </modules> |
| 78 | 78 |