Package com.adito.security

Examples of com.adito.security.SessionInfo


  protected void processApplicationRequest(ExtensionDescriptor app, String ticket, HttpServletRequest request,
                        HttpServletResponse response, Properties properties)
          throws JDOMException, Exception {
    try {
      SessionInfo session = LogonControllerFactory.getInstance().getSessionInfo(request);
      if(session == null) {
        throw new ExtensionException(ExtensionException.INTERNAL_ERROR, "No session.");
      }
      sendApplicationDescriptor(app, request, response, session, properties);
View Full Code Here


    public WrappedFavoriteItem createWrappedFavoriteItem(int resourceId, HttpServletRequest request, String type) throws Exception {
        NetworkPlace np = NetworkPlaceDatabaseFactory.getInstance().getNetworkPlace(resourceId);
        NetworkPlaceItem npi;
        if (np != null) {
            DAVProcessor processor = DAVServlet.getDAVProcessor(request);
            SessionInfo sessionInfo = LogonControllerFactory.getInstance().getSessionInfo(request);
            VFSStore store = processor.getRepository().getStore(np.getScheme());
            if (store == null) {
                log.warn("Store that handles '" + np.getScheme() + "' cannot be found.");
            } else {
                npi = new NetworkPlaceItem(np, store.getMountPath(np.getResourceName()), PolicyDatabaseFactory.getInstance()
                                .getPoliciesAttachedToResource(np, sessionInfo.getUser().getRealm()), np
                                .sessionPasswordRequired(sessionInfo));
                return new WrappedFavoriteItem(npi, type);
            }
        }
        return null;
View Full Code Here

 

  public boolean isEnabled(AvailableTableItemAction availableItem) {
    ResourceItem item = getResourceItem(availableItem);
    HttpServletRequest request = availableItem.getRequest();
    SessionInfo sessionInfo = LogonControllerFactory.getInstance().getSessionInfo(request);
    try {
        // this is an extra check to ensure that the webDav authentication scheme is accessible to allow web folders.
        AuthenticationScheme authenticationSchemeSequence = SystemDatabaseFactory.getInstance().getAuthenticationSchemeSequence("WebDAV", sessionInfo.getRealm().getRealmID());
        boolean principalAllowed = PolicyDatabaseFactory.getInstance().isPrincipalAllowed(sessionInfo.getUser(), authenticationSchemeSequence, true);
        if (principalAllowed){
              BrowserChecker checker = new BrowserChecker(request.getHeader("user-agent"));
              if (item.getResource().getResourceType().equals(
                      NetworkPlacePlugin.NETWORK_PLACE_RESOURCE_TYPE)
                      && CoreUtil
View Full Code Here

       
        if (log.isDebugEnabled())
            log.debug("Registering agent synchronization " + ticket);

        if(DefaultAgentManager.getInstance().getSessionByAgentId(ticket)!=null) {
          SessionInfo session = DefaultAgentManager.getInstance().getSessionByAgentId(ticket);
          session.setSession(request.getSession());       
         
          int timeout = Property.getPropertyInt(new ProfilePropertyKey(
            CoreUtil.getCurrentPropertyProfileId(request.getSession()),
            session.getUser().getPrincipalName(), "client.registration.synchronization.timeout", session.getUser().getRealm().getResourceId()));
 
          if (log.isDebugEnabled())
              log.debug("Waiting for agent registration (timeout " + timeout + ")");
         
          if (DefaultAgentManager.getInstance().waitForRegistrationAndSynchronization(ticket, timeout)) {
View Full Code Here

    public CheckManageResourceTag() {
    }

    public int doStartTag() {

        SessionInfo session = null;
        try {
            session = LogonControllerFactory.getInstance().getSessionInfo(pageContext.getSession());
            if (session== null) {
                return required ? SKIP_BODY : EVAL_BODY_INCLUDE;
            } else {
View Full Code Here

                List granted = ResourceUtil.getGrantedResource(LogonControllerFactory.getInstance().getSessionInfo(request),
                    PolicyConstants.AUTHENTICATION_SCHEMES_RESOURCE_TYPE);
                // does the user have any other signonable authentication
                // schemes?
                boolean found = false;
                SessionInfo info = LogonControllerFactory.getInstance().getSessionInfo(request);
                for (Iterator iter = granted.iterator(); iter.hasNext();) {
                    AuthenticationScheme element = (DefaultAuthenticationScheme) iter.next();
                    if (element.getEnabled() && !element.isSystemScheme() && element.getResourceId() != this.getResourceId()) {

                        for (Iterator iterator = PolicyDatabaseFactory.getInstance().getPoliciesAttachedToResource(element,
                            info.getUser().getRealm()).iterator(); iterator.hasNext();) {
                            Policy policy = (Policy) iterator.next();
                            if (PolicyDatabaseFactory.getInstance().isPolicyGrantedToUser(policy,
                                LogonControllerFactory.getInstance().getSessionInfo(request).getUser())) {
                                found = true;
                            }
View Full Code Here

     * @return ActionForward
     * @throws Exception
     */
    public ActionForward commit(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
                    throws Exception {
        SessionInfo sessionInfo = getSessionInfo(request);
        boolean restartRequired = false;

        // Temporarily store the properties
        if (log.isDebugEnabled())
            log.debug("Commiting properties");
View Full Code Here

        return request.getParameter("actionTarget");
    }

    protected ActionForward rebuildItems(ActionMapping mapping, int parentCategory, AbstractPropertiesForm pf,
                                         HttpServletRequest request, User user) throws Exception {
        SessionInfo sessionInfo = getSessionInfo(request);
        List<PropertyDefinitionCategory> categoryDefinitions = new ArrayList<PropertyDefinitionCategory>();
        List<PropertyDefinitionCategory> subCategories = new ArrayList<PropertyDefinitionCategory>();
        Collection<PropertyDefinitionCategory> sourceCategories = null;
        List<PropertyItemImpl> propertyItemImpls = new ArrayList<PropertyItemImpl>();
        for (PropertyClass propertyClass : pf.getPropertyClasses()) {
View Full Code Here

        LaunchSession launchSession = null;
        VFSResource res = null;
        try {
           
            // Get the launch session
            SessionInfo session = LogonControllerFactory.getInstance().getSessionInfo(request);
            launchSession = session == null ? null : LaunchSessionFactory.getInstance().getLaunchSession(session, upload.getExtraAttribute2());
            if(launchSession == null) {
                throw new Exception("No launch session.");
            }
            launchSession.checkAccessRights(null, session);
View Full Code Here

        if (file==null || file.getFileName() == null || file.getFileName().trim().equals("")) {
            return false;
        }
       
        // Get the launch session
        SessionInfo session = LogonControllerFactory.getInstance().getSessionInfo(request);
        LaunchSession launchSession = session == null ? null : LaunchSessionFactory.getInstance().getLaunchSession(session, fileUpload.getExtraAttribute2());
        if(launchSession == null) {
            throw new Exception("No launch session.");
        }
View Full Code Here

TOP

Related Classes of com.adito.security.SessionInfo

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.