Commit 66ace1f1e0454598fa26fe3f6d10966eadeb5397
1 parent
db2d2cbb
Exists in
master
Criação dos bootstraps para seleção de estratégias de segurança.
Showing
4 changed files
with
105 additions
and
2 deletions
Show diff stats
impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/bootstrap/AuthenticatorBootstrap.java
0 → 100644
| @@ -0,0 +1,48 @@ | @@ -0,0 +1,48 @@ | ||
| 1 | +/* | ||
| 2 | + * Demoiselle Framework | ||
| 3 | + * Copyright (C) 2010 SERPRO | ||
| 4 | + * ---------------------------------------------------------------------------- | ||
| 5 | + * This file is part of Demoiselle Framework. | ||
| 6 | + * | ||
| 7 | + * Demoiselle Framework is free software; you can redistribute it and/or | ||
| 8 | + * modify it under the terms of the GNU Lesser General Public License version 3 | ||
| 9 | + * as published by the Free Software Foundation. | ||
| 10 | + * | ||
| 11 | + * This program is distributed in the hope that it will be useful, | ||
| 12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | + * GNU General Public License for more details. | ||
| 15 | + * | ||
| 16 | + * You should have received a copy of the GNU Lesser General Public License version 3 | ||
| 17 | + * along with this program; if not, see <http://www.gnu.org/licenses/> | ||
| 18 | + * or write to the Free Software Foundation, Inc., 51 Franklin Street, | ||
| 19 | + * Fifth Floor, Boston, MA 02110-1301, USA. | ||
| 20 | + * ---------------------------------------------------------------------------- | ||
| 21 | + * Este arquivo é parte do Framework Demoiselle. | ||
| 22 | + * | ||
| 23 | + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou | ||
| 24 | + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação | ||
| 25 | + * do Software Livre (FSF). | ||
| 26 | + * | ||
| 27 | + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA | ||
| 28 | + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou | ||
| 29 | + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português | ||
| 30 | + * para maiores detalhes. | ||
| 31 | + * | ||
| 32 | + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título | ||
| 33 | + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/> | ||
| 34 | + * ou escreva para a Fundação do Software Livre (FSF) Inc., | ||
| 35 | + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. | ||
| 36 | + */ | ||
| 37 | +package br.gov.frameworkdemoiselle.internal.bootstrap; | ||
| 38 | + | ||
| 39 | +import br.gov.frameworkdemoiselle.internal.implementation.DefaultAuthenticator; | ||
| 40 | +import br.gov.frameworkdemoiselle.security.Authenticator; | ||
| 41 | + | ||
| 42 | +public class AuthenticatorBootstrap extends AbstractStrategyBootstrap<Authenticator, DefaultAuthenticator> { | ||
| 43 | + | ||
| 44 | + public String getConfigurationKey() { | ||
| 45 | + return "frameworkdemoiselle.security.authenticator.class"; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | +} |
impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/bootstrap/AuthorizerBootstrap.java
0 → 100644
| @@ -0,0 +1,48 @@ | @@ -0,0 +1,48 @@ | ||
| 1 | +/* | ||
| 2 | + * Demoiselle Framework | ||
| 3 | + * Copyright (C) 2010 SERPRO | ||
| 4 | + * ---------------------------------------------------------------------------- | ||
| 5 | + * This file is part of Demoiselle Framework. | ||
| 6 | + * | ||
| 7 | + * Demoiselle Framework is free software; you can redistribute it and/or | ||
| 8 | + * modify it under the terms of the GNU Lesser General Public License version 3 | ||
| 9 | + * as published by the Free Software Foundation. | ||
| 10 | + * | ||
| 11 | + * This program is distributed in the hope that it will be useful, | ||
| 12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | + * GNU General Public License for more details. | ||
| 15 | + * | ||
| 16 | + * You should have received a copy of the GNU Lesser General Public License version 3 | ||
| 17 | + * along with this program; if not, see <http://www.gnu.org/licenses/> | ||
| 18 | + * or write to the Free Software Foundation, Inc., 51 Franklin Street, | ||
| 19 | + * Fifth Floor, Boston, MA 02110-1301, USA. | ||
| 20 | + * ---------------------------------------------------------------------------- | ||
| 21 | + * Este arquivo é parte do Framework Demoiselle. | ||
| 22 | + * | ||
| 23 | + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou | ||
| 24 | + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação | ||
| 25 | + * do Software Livre (FSF). | ||
| 26 | + * | ||
| 27 | + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA | ||
| 28 | + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou | ||
| 29 | + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português | ||
| 30 | + * para maiores detalhes. | ||
| 31 | + * | ||
| 32 | + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título | ||
| 33 | + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/> | ||
| 34 | + * ou escreva para a Fundação do Software Livre (FSF) Inc., | ||
| 35 | + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. | ||
| 36 | + */ | ||
| 37 | +package br.gov.frameworkdemoiselle.internal.bootstrap; | ||
| 38 | + | ||
| 39 | +import br.gov.frameworkdemoiselle.internal.implementation.DefaultAuthorizer; | ||
| 40 | +import br.gov.frameworkdemoiselle.security.Authorizer; | ||
| 41 | + | ||
| 42 | +public class AuthorizerBootstrap extends AbstractStrategyBootstrap<Authorizer, DefaultAuthorizer> { | ||
| 43 | + | ||
| 44 | + public String getConfigurationKey() { | ||
| 45 | + return "frameworkdemoiselle.security.authorizer.class"; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | +} |
impl/core/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
| 1 | br.gov.frameworkdemoiselle.internal.bootstrap.CoreBootstrap | 1 | br.gov.frameworkdemoiselle.internal.bootstrap.CoreBootstrap |
| 2 | br.gov.frameworkdemoiselle.internal.bootstrap.ConfigurationBootstrap | 2 | br.gov.frameworkdemoiselle.internal.bootstrap.ConfigurationBootstrap |
| 3 | br.gov.frameworkdemoiselle.internal.bootstrap.TransactionBootstrap | 3 | br.gov.frameworkdemoiselle.internal.bootstrap.TransactionBootstrap |
| 4 | +br.gov.frameworkdemoiselle.internal.bootstrap.AuthenticatorBootstrap | ||
| 5 | +br.gov.frameworkdemoiselle.internal.bootstrap.AuthorizerBootstrap | ||
| 4 | br.gov.frameworkdemoiselle.internal.bootstrap.StartupBootstrap | 6 | br.gov.frameworkdemoiselle.internal.bootstrap.StartupBootstrap |
| 5 | br.gov.frameworkdemoiselle.internal.bootstrap.ShutdownBootstrap | 7 | br.gov.frameworkdemoiselle.internal.bootstrap.ShutdownBootstrap |
impl/core/src/main/resources/demoiselle-core-bundle.properties
| @@ -86,10 +86,15 @@ access-checking=Verificando permiss\u00E3o do usu\u00E1rio "{0}" para executar a | @@ -86,10 +86,15 @@ access-checking=Verificando permiss\u00E3o do usu\u00E1rio "{0}" para executar a | ||
| 86 | access-allowed=O usu\u00E1rio "{0}" acessou o recurso "{2}" com a a\u00E7\u00E3o "{1}" | 86 | access-allowed=O usu\u00E1rio "{0}" acessou o recurso "{2}" com a a\u00E7\u00E3o "{1}" |
| 87 | access-denied=O usu\u00E1rio "{0}" n\u00E3o possui permiss\u00E3o para executar a a\u00E7\u00E3o "{1}" no recurso "{2}" | 87 | access-denied=O usu\u00E1rio "{0}" n\u00E3o possui permiss\u00E3o para executar a a\u00E7\u00E3o "{1}" no recurso "{2}" |
| 88 | access-denied-ui=Voc\u00EA n\u00E3o est\u00E1 autorizado a executar a a\u00E7\u00E3o {1} no recurso {0} | 88 | access-denied-ui=Voc\u00EA n\u00E3o est\u00E1 autorizado a executar a a\u00E7\u00E3o {1} no recurso {0} |
| 89 | -authorizer-not-defined=Nenhuma regra de resolu\u00E7\u00E3o de permiss\u00F5es foi definida. Para utilizar @{0} \u00E9 preciso definir a estrat\u00E9gia de resolu\u00E7\u00E3o de permiss\u00F5es desejada no arquivo beans.xml | 89 | +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. |
| 90 | +authorizer-class-not-found=A classe de resolu\u00E7\u00E3o de permiss\u00F5es "{0}" informada no demoiselle.properties n\u00E3o foi encontrada no classpath. | ||
| 91 | +authorizer-class-must-be-of-type=A classe de resolu\u00E7\u00E3o de permiss\u00F5es "{0}" informada no demoiselle.properties deve ser do tipo "{1}" | ||
| 90 | user-not-authenticated=Usu\u00E1rio n\u00E3o autenticado | 92 | user-not-authenticated=Usu\u00E1rio n\u00E3o autenticado |
| 91 | has-role-verification=Verificando se o usu\u00E1rio {0} possui a(s) role(s)\: {1} | 93 | has-role-verification=Verificando se o usu\u00E1rio {0} possui a(s) role(s)\: {1} |
| 92 | does-not-have-role=Usu\u00E1rio {0} n\u00E3o possui a(s) role(s)\: {1} | 94 | does-not-have-role=Usu\u00E1rio {0} n\u00E3o possui a(s) role(s)\: {1} |
| 93 | does-not-have-role-ui=Para acessar este recurso \u00E9 necess\u00E1rio ser {0} | 95 | does-not-have-role-ui=Para acessar este recurso \u00E9 necess\u00E1rio ser {0} |
| 94 | user-has-role=Usu\u00E1rio {0} possui a(s) role(s)\: {1} | 96 | user-has-role=Usu\u00E1rio {0} possui a(s) role(s)\: {1} |
| 95 | -authenticator-not-defined=Nenhum mecanismo de autentica\u00E7\u00E3o foi definido. Para utilizar {0} \u00E9 preciso definir o mecanismo de autentica\u00E7\u00E3o desejado no arquivo beans.xml | ||
| 96 | \ No newline at end of file | 97 | \ No newline at end of file |
| 98 | + | ||
| 99 | +authenticator-not-defined=Nenhum mecanismo de autentica\u00E7\u00E3o foi definido. Para utilizar {0} \u00E9 preciso definir a propriedade frameworkdemoiselle.security.authenticator.class como mecanismo de autentica\u00E7\u00E3o desejado no arquivo demoiselle.properties. | ||
| 100 | +authenticator-class-not-found=A classe de autentica\u00E7\u00E3o "{0}" informada no demoiselle.properties n\u00E3o foi encontrada no classpath. | ||
| 101 | +authenticator-class-must-be-of-type=A classe de autentica\u00E7\u00E3o "{0}" informada no demoiselle.properties deve ser do tipo "{1}" | ||
| 97 | \ No newline at end of file | 102 | \ No newline at end of file |