Package com.cosmo.security.auth

Examples of com.cosmo.security.auth.Authentication


      pc.setTitle("Crear compte d'usuari - " + getWorkspace().getName());

      try
      {
         // Comprueba si el agente es el adecuado
         Authentication ap = AuthenticationFactory.getInstance(getWorkspace());
         if (!(ap instanceof PostgreSqlAuthenticationImpl))
         {
            DynamicMessageControl msg = new DynamicMessageControl(getWorkspace(), "msg");
            msg.setType(MessageTypes.Error);
            msg.setMessage("Nom�s es poden gestionar els comptes d'usuari amb el prove�dor natiu de Cosmo (PostgreSqlAuthenticationProvider).");
View Full Code Here


    * @throws UserNotFoundException
    */
   public void checkPageSecurity(Page page, Workspace workspace, HttpServletRequest request, HttpServletResponse response) throws IOException, NotAuthorizedException, AuthenticationException, UserNotFoundException, AuthorizationException
   {
      // Obtiene el agente de autenticaci�n
      Authentication auth = AuthenticationFactory.getInstance(workspace);

      //----------------------
      // Sesi�n de usuario
      //----------------------

View Full Code Here

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

      initialize();

      this.workspace = workspace;

      // Verifica que la seguridad se encuentre habilitada
      Authentication authenticator = AuthenticationFactory.getInstance(workspace);
      if (authenticator == null)
      {
         throw new AuthenticationException("La seguridad no est� habilitada para este workspace.");
      }
View Full Code Here

   public void destroy()
   {
      try
      {
         // Invoca el m�todo logout() en el agente de autenticaci�n
         Authentication authenticationProvider = AuthenticationFactory.getInstance(workspace);
         authenticationProvider.logout();
      }
      catch (Exception ex)
      {
         // No se tiene en cuenta
      }
View Full Code Here

      try
      {
         if (getWorkspace().isValidUserSession())
         {
            // Obtiene el agente de autenticaci�n
            Authentication authent = AuthenticationFactory.getInstance(getWorkspace());

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

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

      pc.setTitle("Crear compte d'usuari - " + getWorkspace().getName());
     
      try
      {
         // Comprueba si el agente es el adecuado
         Authentication ap = AuthenticationFactory.getInstance(getWorkspace());
         if (!(ap instanceof PostgreSqlAuthenticationImpl))
         {
            DynamicMessageControl msg = new DynamicMessageControl(getWorkspace(), "msg");
            msg.setType(MessageTypes.Error);
            msg.setMessage("Nom�s es poden gestionar els comptes d'usuari amb el prove�dor natiu de Cosmo (PostgreSqlAuthenticationProvider).");
View Full Code Here

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

TOP

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

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.