Package org.apache.slide.authenticate

Examples of org.apache.slide.authenticate.SecurityToken


       
        NamespaceAccessToken token = null;
       
        try {
           
            token = Domain.accessNamespace(new SecurityToken(new String()),
                                           "xml");
           
            Structure structure = token.getStructureHelper();
            Security security = token.getSecurityHelper();
            Lock lock = token.getLockHelper();
View Full Code Here


        if (namespace == null)
            namespace = container.getName();

        if (accessToken == null)
            accessToken = Domain.accessNamespace
                (new SecurityToken(container), namespace);

        if (accessToken == null)
            throw new IllegalStateException
                ("Invalid Slide Realm configuration : "
                 + "Couldn't access namespace " + namespace);
View Full Code Here

                    namespaceName = Domain.getDefaultNamespace();
                }
                while (namespaceName.startsWith("/")) {
                    namespaceName = namespaceName.substring(1);
                }
                token = Domain.accessNamespace(new SecurityToken(this), namespaceName);
            }
           
            resp.setStatus(WebdavStatus.SC_OK);
           
            String methodName = req.getMethod();
View Full Code Here

                    log("No namespace specified, will use default namespace: " +
                            namespaceName);
                }
               
                token = Domain.accessNamespace
                    (new SecurityToken(this), namespaceName);
                if (token == null) {
                    log("Could not access namespace " + namespaceName + ".");
                    throw new UnavailableException("Namespace " + namespaceName +
                                                       " not accessible");
                }
View Full Code Here

    catch (Exception e)
    {
      throw new JetspeedCMSException();
    }

    token = Domain.accessNamespace(new SecurityToken(new String()), namespace);

    structure = token.getStructureHelper();
    security = token.getSecurityHelper();
    content = token.getContentHelper();
    lock = token.getLockHelper();
View Full Code Here

            final int lifetime = node.getAttributeAsInt("subscription-lifetime", 3600);
            final int notificationDelay = node.getAttributeAsInt("notification-delay", 0);

            final Subscriber contentSubscriber = new Subscriber() {
                public void notify(String uri, Map information) {
                    NamespaceAccessToken nat = Domain.accessNamespace(new SecurityToken(this), Domain.getDefaultNamespace());
                    try {
                        nat.begin();
                        Iterator keys = information.keySet().iterator();
                        while (keys.hasNext()) {
                            String key = keys.next().toString();
                            if ("uri".equals(key)) {
                                Uri theUri = nat.getUri(new SlideTokenImpl(new CredentialsToken("")), stripUri(information.get(key).toString()));
                                Store store = theUri.getStore();
                                if (store instanceof ExtendedStore) {
                                    Domain.log("Resetting cache for " + theUri, LOG_CHANNEL, Logger.INFO);
                                    ((ExtendedStore) store).removeObjectFromCache(theUri);
                                }
                            }
                        }
                        nat.commit();
                    } catch(Exception e) {
                      if (Domain.isEnabled(LOG_CHANNEL, Logger.ERROR)) {
                        Domain.log("Error clearing cache: " + e + ". See stderr for stacktrace.", LOG_CHANNEL, Logger.ERROR);
                        e.printStackTrace();
                      }
                    }
                }
            };

            final Subscriber structureSubscriber = new Subscriber() {
                public void notify(String uri, Map information) {
                    NamespaceAccessToken nat = Domain.accessNamespace(new SecurityToken(this), Domain.getDefaultNamespace());
                    try {
                        nat.begin();
                      Iterator keys = information.keySet().iterator();
                      while (keys.hasNext()) {
                          String key = keys.next().toString();
View Full Code Here

        if (namespace == null) {
            namespace = Domain.getDefaultNamespace();
        }
       
        // access the namespace
        NamespaceAccessToken nat = Domain.accessNamespace(new SecurityToken(this),namespace);
        m_content = nat.getContentHelper();
        m_security = nat.getSecurityHelper();
        m_usersPath = nat.getNamespaceConfig().getUsersPath();
        m_rolesPath = nat.getNamespaceConfig().getRolesPath();
    }
View Full Code Here

                    namespaceName = Domain.getDefaultNamespace();
                }
                while (namespaceName.startsWith("/")) {
                    namespaceName = namespaceName.substring(1);
                }
                token = Domain.accessNamespace(new SecurityToken(this), namespaceName);
            }
           
            resp.setStatus(WebdavStatus.SC_OK);
           
            String methodName = req.getMethod();
View Full Code Here

                    log("No namespace specified, will use default namespace: " +
                            namespaceName);
                }
               
                token = Domain.accessNamespace
                    (new SecurityToken(this), namespaceName);
                if (token == null) {
                    log("Could not access namespace " + namespaceName + ".");
                    throw new UnavailableException("Namespace " + namespaceName +
                                                       " not accessible");
                }
View Full Code Here

        if (namespace == null)
            namespace = container.getName();

        if (accessToken == null)
            accessToken = Domain.accessNamespace
                (new SecurityToken(container), namespace);

        if (accessToken == null)
            throw new IllegalStateException
                ("Invalid Slide Realm configuration : "
                 + "Couldn't access namespace " + namespace);
View Full Code Here

TOP

Related Classes of org.apache.slide.authenticate.SecurityToken

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.