All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.eng.spago.security.xmlauthorizations.XMLAuthorizationHandler Maven / Gradle / Ivy

/**

    Copyright 2004, 2007 Engineering Ingegneria Informatica S.p.A.

    This file is part of Spago.

    Spago is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation; either version 2.1 of the License, or
    any later version.

    Spago 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 Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with Spago; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

**/
package it.eng.spago.security.xmlauthorizations;

import it.eng.spago.base.Constants;
import it.eng.spago.base.RequestContainer;
import it.eng.spago.error.EMFInternalError;
import it.eng.spago.security.IAuthorizationHandler;
import it.eng.spago.security.IEngUserProfile;
import it.eng.spago.tracing.TracerSingleton;

/**
 * @author Andrea Zoppello
 *
 *
 * Nella versione 2 del profile manager c'e' una netta separazione della fase di
 * autenticazione dalla fase di autorizazione.
 *
 * Il Profile Manager di engiweb mette comunque a disposizione il servizio di
 * autenticazione su un servizio che supporta le interfacce di autenticazione
 * engiweb.
 *
 * Il servizio di autenticazione di engiweb ? fornito dalla classe
 * EngiwebServiceAuthenticationHandler
 */
public class XMLAuthorizationHandler implements IAuthorizationHandler {
    public XMLAuthorizationHandler() {
        super();
    } // public XMLAuthorizationHandler()

    /**
     * @see it.eng.spago.security.actions.IAuthorizationHandler#putAuhtorizationProfile(java.security.Principal, it.eng.spago.base.RequestContainer, java.util.Map)
     */
    public void putAuhtorizationProfile(Object userIdentifier, RequestContainer requestContainer) throws EMFInternalError {
        TracerSingleton.log(Constants.NOME_MODULO, TracerSingleton.DEBUG,
            "XMLAuthorizationHandler::putAuhtorizationProfile: userIdentifier [" + userIdentifier + "]");
        IEngUserProfile userProfile = new XMLUserProfile((String)userIdentifier);
        requestContainer.getSessionContainer().getPermanentContainer()
            .setAttribute(IEngUserProfile.ENG_USER_PROFILE, userProfile);
    } // public void putAuhtorizationProfile(Object userIdentifier, RequestContainer requestContainer) throws EMFInternalError
} // public class XMLAuthorizationHandler implements IAuthorizationHandler




© 2015 - 2025 Weber Informatics LLC | Privacy Policy