* @throws AuthorizationException
*/
public UserSession(Workspace workspace, String login, String pwd) throws UserNotFoundException, AuthenticationException, AuthorizationException
{
Authentication authenticator = null;
Authorization authorizator = null;
initialize();
this.workspace = workspace;
// Instancia el proveedor de autenticaci�n
authenticator = AuthenticationFactory.getInstance(workspace);
if (authenticator != null)
{
// Autenticaci�n
this.currentUser = authenticator.login(login, pwd);
try
{
// Instancia el proveedor de seguridad
authorizator = AuthorizationFactory.getInstance(workspace);
// Obtiene las pol�ticas de autorizaci�n para el usuario autenticado
this.securityInfo = authorizator.getAuthorizationData(login);
}
catch (AuthorizationException ex)
{
// Crea una pol�tica de autorizaciones vac�a
this.securityInfo = new UserSecurityPolicy();