diff --git a/impl/extension/jaas/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/LoginContextFactory.java b/impl/extension/jaas/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/LoginContextFactory.java deleted file mode 100644 index 3b435eb..0000000 --- a/impl/extension/jaas/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/LoginContextFactory.java +++ /dev/null @@ -1,135 +0,0 @@ -///* -// * Demoiselle Framework -// * Copyright (C) 2010 SERPRO -// * ---------------------------------------------------------------------------- -// * This file is part of Demoiselle Framework. -// * -// * Demoiselle Framework is free software; you can redistribute it and/or -// * modify it under the terms of the GNU Lesser General Public License version 3 -// * as published by the Free Software Foundation. -// * -// * This program is distributed in the hope that it will be useful, -// * but WITHOUT ANY WARRANTY; without even the implied warranty of -// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// * GNU General Public License for more details. -// * -// * You should have received a copy of the GNU Lesser General Public License version 3 -// * along with this program; if not, see -// * or write to the Free Software Foundation, Inc., 51 Franklin Street, -// * Fifth Floor, Boston, MA 02110-1301, USA. -// * ---------------------------------------------------------------------------- -// * Este arquivo é parte do Framework Demoiselle. -// * -// * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou -// * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação -// * do Software Livre (FSF). -// * -// * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA -// * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou -// * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português -// * para maiores detalhes. -// * -// * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título -// * "LICENCA.txt", junto com esse programa. Se não, acesse -// * ou escreva para a Fundação do Software Livre (FSF) Inc., -// * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. -// */ -//package br.gov.frameworkdemoiselle.internal.implementation; -// -//import java.io.Serializable; -// -//import javax.enterprise.context.ContextNotActiveException; -//import javax.enterprise.context.SessionScoped; -//import javax.security.auth.Subject; -//import javax.security.auth.callback.CallbackHandler; -//import javax.security.auth.login.LoginContext; -//import javax.security.auth.login.LoginException; -// -//import br.gov.frameworkdemoiselle.internal.configuration.JAASConfig; -//import br.gov.frameworkdemoiselle.security.SecurityException; -//import br.gov.frameworkdemoiselle.util.Beans; -// -//@SessionScoped -//public class LoginContextFactory implements Serializable { -// -// private static final long serialVersionUID = 1L; -// -// private transient LoginContext loginContext; -// -// private String name; -// -// private CallbackHandler callbackHandler; -// -// private LoginContext getLoginContext() throws LoginException { -// if (this.loginContext == null) { -// this.loginContext = new LoginContext(getName(), new Subject(), getCallbackHandler()); -// } -// -// getName(); -// -// return this.loginContext; -// } -// -// public static LoginContext createLoginContext() { -// LoginContext loginContext; -// -// try { -// loginContext = Beans.getReference(LoginContextFactory.class).getLoginContext(); -// -// } catch (ContextNotActiveException cause) { -// loginContext = null; -// -// } catch (LoginException cause) { -// throw new SecurityException(cause); -// } -// -// if (loginContext == null) { -// try { -// loginContext = new LoginContextFactory().getLoginContext(); -// -// } catch (LoginException cause) { -// throw new SecurityException(cause); -// } -// } -// -// return loginContext; -// } -// -// public static void destroyLoginContext() { -// try { -// LoginContextFactory factory = Beans.getReference(LoginContextFactory.class); -// factory.clean(); -// -// } catch (ContextNotActiveException cause) { -// } -// } -// -// private void clean() { -// if (this.loginContext != null) { -// -// try { -// this.loginContext.logout(); -// -// } catch (LoginException cause) { -// } -// -// this.loginContext = null; -// } -// } -// -// private String getName() { -// if (this.name == null) { -// this.name = Beans.getReference(JAASConfig.class).getLoginModuleName(); -// } -// -// return this.name; -// } -// -// private CallbackHandler getCallbackHandler() { -// if (this.callbackHandler == null) { -// this.callbackHandler = Beans.getReference(CallbackHandler.class); -// } -// -// return this.callbackHandler; -// } -//} diff --git a/impl/extension/jaas/src/main/java/br/gov/frameworkdemoiselle/internal/producer/CallbackHandlerProducer.java b/impl/extension/jaas/src/main/java/br/gov/frameworkdemoiselle/internal/producer/CallbackHandlerProducer.java deleted file mode 100644 index e50c6c0..0000000 --- a/impl/extension/jaas/src/main/java/br/gov/frameworkdemoiselle/internal/producer/CallbackHandlerProducer.java +++ /dev/null @@ -1,60 +0,0 @@ -///* -// * Demoiselle Framework -// * Copyright (C) 2010 SERPRO -// * ---------------------------------------------------------------------------- -// * This file is part of Demoiselle Framework. -// * -// * Demoiselle Framework is free software; you can redistribute it and/or -// * modify it under the terms of the GNU Lesser General Public License version 3 -// * as published by the Free Software Foundation. -// * -// * This program is distributed in the hope that it will be useful, -// * but WITHOUT ANY WARRANTY; without even the implied warranty of -// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// * GNU General Public License for more details. -// * -// * You should have received a copy of the GNU Lesser General Public License version 3 -// * along with this program; if not, see -// * or write to the Free Software Foundation, Inc., 51 Franklin Street, -// * Fifth Floor, Boston, MA 02110-1301, USA. -// * ---------------------------------------------------------------------------- -// * Este arquivo é parte do Framework Demoiselle. -// * -// * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou -// * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação -// * do Software Livre (FSF). -// * -// * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA -// * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou -// * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português -// * para maiores detalhes. -// * -// * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título -// * "LICENCA.txt", junto com esse programa. Se não, acesse -// * ou escreva para a Fundação do Software Livre (FSF) Inc., -// * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. -// */ -//package br.gov.frameworkdemoiselle.internal.producer; -// -//import java.io.Serializable; -// -//import javax.enterprise.context.RequestScoped; -//import javax.enterprise.inject.Produces; -//import javax.security.auth.callback.CallbackHandler; -// -//import br.gov.frameworkdemoiselle.internal.proxy.CallbackHandlerProxy; -//import br.gov.frameworkdemoiselle.security.Credentials; -//import br.gov.frameworkdemoiselle.util.Beans; -// -//public class CallbackHandlerProducer implements Serializable { -// -// private static final long serialVersionUID = 1L; -// -// @Produces -// @RequestScoped -// public CallbackHandler create() { -// Credentials credentials = Beans.getReference(Credentials.class); -// -// return new CallbackHandlerProxy(credentials); -// } -//} diff --git a/impl/extension/jaas/src/main/java/br/gov/frameworkdemoiselle/internal/proxy/CallbackHandlerProxy.java b/impl/extension/jaas/src/main/java/br/gov/frameworkdemoiselle/internal/proxy/CallbackHandlerProxy.java deleted file mode 100644 index 7debeb4..0000000 --- a/impl/extension/jaas/src/main/java/br/gov/frameworkdemoiselle/internal/proxy/CallbackHandlerProxy.java +++ /dev/null @@ -1,92 +0,0 @@ -///* -// * Demoiselle Framework -// * Copyright (C) 2010 SERPRO -// * ---------------------------------------------------------------------------- -// * This file is part of Demoiselle Framework. -// * -// * Demoiselle Framework is free software; you can redistribute it and/or -// * modify it under the terms of the GNU Lesser General Public License version 3 -// * as published by the Free Software Foundation. -// * -// * This program is distributed in the hope that it will be useful, -// * but WITHOUT ANY WARRANTY; without even the implied warranty of -// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// * GNU General Public License for more details. -// * -// * You should have received a copy of the GNU Lesser General Public License version 3 -// * along with this program; if not, see -// * or write to the Free Software Foundation, Inc., 51 Franklin Street, -// * Fifth Floor, Boston, MA 02110-1301, USA. -// * ---------------------------------------------------------------------------- -// * Este arquivo é parte do Framework Demoiselle. -// * -// * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou -// * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação -// * do Software Livre (FSF). -// * -// * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA -// * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou -// * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português -// * para maiores detalhes. -// * -// * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título -// * "LICENCA.txt", junto com esse programa. Se não, acesse -// * ou escreva para a Fundação do Software Livre (FSF) Inc., -// * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. -// */ -//package br.gov.frameworkdemoiselle.internal.proxy; -// -//import java.io.IOException; -//import java.io.Serializable; -// -//import javax.security.auth.callback.Callback; -//import javax.security.auth.callback.CallbackHandler; -//import javax.security.auth.callback.NameCallback; -//import javax.security.auth.callback.PasswordCallback; -//import javax.security.auth.callback.UnsupportedCallbackException; -// -//import br.gov.frameworkdemoiselle.security.Credentials; -// -//public class CallbackHandlerProxy implements CallbackHandler, Serializable { -// -// private static final long serialVersionUID = 1L; -// -// private transient CallbackHandler delegate; -// -// private final Credentials credentials; -// -// public CallbackHandlerProxy(Credentials credentials) { -// this.credentials = credentials; -// } -// -// private CallbackHandler getDelegate() { -// if (this.delegate == null) { -// this.delegate = create(); -// } -// -// return this.delegate; -// } -// -// private CallbackHandler create() { -// return new CallbackHandler() { -// -// public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { -// for (int i = 0; i < callbacks.length; i++) { -// if (callbacks[i] instanceof NameCallback) { -// ((NameCallback) callbacks[i]).setName(credentials.getUsername()); -// -// } else if (callbacks[i] instanceof PasswordCallback) { -// ((PasswordCallback) callbacks[i]).setPassword(credentials.getPassword().toCharArray()); -// -// } else { -// System.out.println("XXXXXXXXXXXXXXXXXXXXXXXXXXXX Unsupported callback " + callbacks[i]); -// } -// } -// } -// }; -// } -// -// public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { -// getDelegate().handle(callbacks); -// } -//} diff --git a/impl/extension/jaas/src/main/java/br/gov/frameworkdemoiselle/internal/proxy/LoginContextProxy.java b/impl/extension/jaas/src/main/java/br/gov/frameworkdemoiselle/internal/proxy/LoginContextProxy.java deleted file mode 100644 index 8517b81..0000000 --- a/impl/extension/jaas/src/main/java/br/gov/frameworkdemoiselle/internal/proxy/LoginContextProxy.java +++ /dev/null @@ -1,120 +0,0 @@ -///* -// * Demoiselle Framework -// * Copyright (C) 2010 SERPRO -// * ---------------------------------------------------------------------------- -// * This file is part of Demoiselle Framework. -// * -// * Demoiselle Framework is free software; you can redistribute it and/or -// * modify it under the terms of the GNU Lesser General Public License version 3 -// * as published by the Free Software Foundation. -// * -// * This program is distributed in the hope that it will be useful, -// * but WITHOUT ANY WARRANTY; without even the implied warranty of -// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// * GNU General Public License for more details. -// * -// * You should have received a copy of the GNU Lesser General Public License version 3 -// * along with this program; if not, see -// * or write to the Free Software Foundation, Inc., 51 Franklin Street, -// * Fifth Floor, Boston, MA 02110-1301, USA. -// * ---------------------------------------------------------------------------- -// * Este arquivo é parte do Framework Demoiselle. -// * -// * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou -// * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação -// * do Software Livre (FSF). -// * -// * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA -// * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou -// * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português -// * para maiores detalhes. -// * -// * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título -// * "LICENCA.txt", junto com esse programa. Se não, acesse -// * ou escreva para a Fundação do Software Livre (FSF) Inc., -// * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. -// */ -//package br.gov.frameworkdemoiselle.internal.proxy; -// -//import java.io.Serializable; -// -//import javax.enterprise.context.Dependent; -//import javax.security.auth.Subject; -//import javax.security.auth.callback.CallbackHandler; -//import javax.security.auth.login.LoginContext; -//import javax.security.auth.login.LoginException; -// -//import br.gov.frameworkdemoiselle.internal.configuration.JAASConfig; -//import br.gov.frameworkdemoiselle.security.SecurityException; -//import br.gov.frameworkdemoiselle.util.Beans; -// -////@Alternative -////@SessionScoped -//@Dependent -//public class LoginContextProxy extends LoginContext implements Serializable { -// -// private static final long serialVersionUID = 1L; -// -// private transient LoginContext delegate; -// -// private transient CallbackHandler callbackHandler; -// -// private String name; -// -// // public LoginContextProxy() { -// // super(name) -// // } -// -// public LoginContextProxy() { -// super(""); -// } -// -// private String getName() { -// if (this.name == null) { -// this.name = Beans.getReference(JAASConfig.class).getLoginModuleName(); -// } -// -// return this.name; -// } -// -// private LoginContext getDelegate() { -// if (this.delegate == null) { -// try { -// this.delegate = new LoginContext(getName(), getCallbackHandler()); -// -// } catch (LoginException cause) { -// throw new SecurityException(cause); -// } -// } -// -// return this.delegate; -// } -// -// private CallbackHandler getCallbackHandler() { -// if (this.callbackHandler == null) { -// this.callbackHandler = Beans.getReference(CallbackHandler.class); -// } -// -// return this.callbackHandler; -// } -// -// public boolean equals(Object object) { -// return getDelegate().equals(object); -// } -// -// public Subject getSubject() { -// return getDelegate().getSubject(); -// } -// -// public int hashCode() { -// return getDelegate().hashCode(); -// } -// -// public void login() throws LoginException { -// getDelegate().login(); -// } -// -// public void logout() throws LoginException { -// getDelegate().logout(); -// } -//} -- libgit2 0.21.2