Commit 255aa4fa991304fe39ec646eeea7bf2ba091cdc5
1 parent
29144b24
remove comments
Showing
3 changed files
with
1 additions
and
24 deletions
Show diff stats
demoiselle-parent-bom/pom.xml
| @@ -2,9 +2,7 @@ | @@ -2,9 +2,7 @@ | ||
| 2 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | 2 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 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 | - <groupId>org.demoiselle.jee</groupId> | ||
| 6 | <artifactId>demoiselle-parent-bom</artifactId> | 5 | <artifactId>demoiselle-parent-bom</artifactId> |
| 7 | - <version>3.0.0-BETA1-SNAPSHOT</version> | ||
| 8 | <packaging>pom</packaging> | 6 | <packaging>pom</packaging> |
| 9 | <modelVersion>4.0.0</modelVersion> | 7 | <modelVersion>4.0.0</modelVersion> |
| 10 | 8 |
demoiselle-security/src/main/java/org/demoiselle/jee/security/impl/SecurityContextImpl.java
| @@ -6,7 +6,6 @@ | @@ -6,7 +6,6 @@ | ||
| 6 | */ | 6 | */ |
| 7 | package org.demoiselle.jee.security.impl; | 7 | package org.demoiselle.jee.security.impl; |
| 8 | 8 | ||
| 9 | -import javax.enterprise.context.Dependent; | ||
| 10 | import javax.enterprise.context.RequestScoped; | 9 | import javax.enterprise.context.RequestScoped; |
| 11 | import javax.inject.Inject; | 10 | import javax.inject.Inject; |
| 12 | import org.demoiselle.jee.core.interfaces.security.DemoisellePrincipal; | 11 | import org.demoiselle.jee.core.interfaces.security.DemoisellePrincipal; |
| @@ -14,13 +13,7 @@ import org.demoiselle.jee.core.interfaces.security.DemoisellePrincipal; | @@ -14,13 +13,7 @@ import org.demoiselle.jee.core.interfaces.security.DemoisellePrincipal; | ||
| 14 | import org.demoiselle.jee.core.interfaces.security.SecurityContext; | 13 | import org.demoiselle.jee.core.interfaces.security.SecurityContext; |
| 15 | import org.demoiselle.jee.core.interfaces.security.TokensManager; | 14 | import org.demoiselle.jee.core.interfaces.security.TokensManager; |
| 16 | 15 | ||
| 17 | -/** | ||
| 18 | - * <p> | ||
| 19 | - * This is the default implementation of {@link SecurityContext} interface. | ||
| 20 | - * </p> | ||
| 21 | - * | ||
| 22 | - * @author SERPRO | ||
| 23 | - */ | 16 | + |
| 24 | @RequestScoped | 17 | @RequestScoped |
| 25 | public class SecurityContextImpl implements SecurityContext { | 18 | public class SecurityContextImpl implements SecurityContext { |
| 26 | 19 | ||
| @@ -29,10 +22,6 @@ public class SecurityContextImpl implements SecurityContext { | @@ -29,10 +22,6 @@ public class SecurityContextImpl implements SecurityContext { | ||
| 29 | @Inject | 22 | @Inject |
| 30 | private TokensManager tm; | 23 | private TokensManager tm; |
| 31 | 24 | ||
| 32 | - /** | ||
| 33 | - * @see org.demoiselle.security.SecurityContext#hasPermission(String, | ||
| 34 | - * String) | ||
| 35 | - */ | ||
| 36 | @Override | 25 | @Override |
| 37 | public boolean hasPermission(String resource, String operation) { | 26 | public boolean hasPermission(String resource, String operation) { |
| 38 | if ((tm.getUser().getPermissions().entrySet() | 27 | if ((tm.getUser().getPermissions().entrySet() |
| @@ -45,9 +34,6 @@ public class SecurityContextImpl implements SecurityContext { | @@ -45,9 +34,6 @@ public class SecurityContextImpl implements SecurityContext { | ||
| 45 | return true; | 34 | return true; |
| 46 | } | 35 | } |
| 47 | 36 | ||
| 48 | - /** | ||
| 49 | - * @see org.demoiselle.security.SecurityContext#hasRole(String) | ||
| 50 | - */ | ||
| 51 | @Override | 37 | @Override |
| 52 | public boolean hasRole(String role) { | 38 | public boolean hasRole(String role) { |
| 53 | if (tm.getUser().getRoles().stream().filter(p -> p.equals(role)).count() <= 0) { | 39 | if (tm.getUser().getRoles().stream().filter(p -> p.equals(role)).count() <= 0) { |
| @@ -56,9 +42,6 @@ public class SecurityContextImpl implements SecurityContext { | @@ -56,9 +42,6 @@ public class SecurityContextImpl implements SecurityContext { | ||
| 56 | return true; | 42 | return true; |
| 57 | } | 43 | } |
| 58 | 44 | ||
| 59 | - /** | ||
| 60 | - * @see org.demoiselle.security.SecurityContext#isLoggedIn() | ||
| 61 | - */ | ||
| 62 | @Override | 45 | @Override |
| 63 | public boolean isLoggedIn() { | 46 | public boolean isLoggedIn() { |
| 64 | return tm.validate(); | 47 | return tm.validate(); |
demoiselle-security/src/main/java/org/demoiselle/jee/security/impl/TokenImpl.java
| @@ -8,10 +8,6 @@ package org.demoiselle.jee.security.impl; | @@ -8,10 +8,6 @@ package org.demoiselle.jee.security.impl; | ||
| 8 | import javax.enterprise.context.RequestScoped; | 8 | import javax.enterprise.context.RequestScoped; |
| 9 | import org.demoiselle.jee.core.interfaces.security.Token; | 9 | import org.demoiselle.jee.core.interfaces.security.Token; |
| 10 | 10 | ||
| 11 | -/** | ||
| 12 | - * | ||
| 13 | - * @author 70744416353 | ||
| 14 | - */ | ||
| 15 | @RequestScoped | 11 | @RequestScoped |
| 16 | public class TokenImpl implements Token { | 12 | public class TokenImpl implements Token { |
| 17 | 13 |