Package com.cosmo.security.auth

Examples of com.cosmo.security.auth.Authorization


    * @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();
View Full Code Here


      // Establece el usuario actual
      this.currentUser = user;

      // Obtiene la informaci�n sobre autorizaci�n del usuario
      Authorization authorizator = AuthorizationFactory.getInstance(workspace);
      if (authorizator != null)
      {
         // Obtiene las pol�ticas de autorizaci�n para el usuario autenticado
         this.securityInfo = authorizator.getAuthorizationData(user.getLogin());
      }
   }
View Full Code Here

      try
      {
         if (getWorkspace().isValidUserSession())
         {
            // Obtiene el agente de autenticaci�n
            Authorization autho = AuthorizationFactory.getInstance(getWorkspace());

            lst = new ArrayList<String>();
            lst.add("Classe: //" + autho.getClass().getName() + "//");
            for (Entry<String, String> entry : autho.getParameters().entrySet())
            {
               lst.add(entry.getKey() + ": '''" + entry.getValue() + "'''");
            }

            XhtmlControl xAutho = (XhtmlControl) pc.getControl("xAutho");
View Full Code Here

      try
      {
         if (getWorkspace().isValidUserSession())
         {
            // Obtiene el agente de autenticaci�n
            Authorization autho = AuthorizationFactory.getInstance(getWorkspace());
           
            lst = new ArrayList<String>();
            lst.add("Classe: //" + autho.getClass().getName() + "//");
            for (Entry<String, String> entry : autho.getParameters().entrySet())
            {
               lst.add(entry.getKey() + ": '''" + entry.getValue() + "'''");
            }
           
            XhtmlControl xAutho = (XhtmlControl) pc.getControl("xAutho");
View Full Code Here

TOP

Related Classes of com.cosmo.security.auth.Authorization

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.