Examples of CredentialsToken


Examples of org.apache.slide.authenticate.CredentialsToken

                       String sourcerevision,
                       String sourcerevisionbranch) throws SourceException {

        this.sourcecredential = sourcecredential;

        this.credToken = new CredentialsToken(this.sourcecredential.getPrincipal());
        this.nat = nat;
        this.config = this.nat.getNamespaceConfig();
        this.scheme = scheme;
        this.path = path;
        this.uri = scheme+":/"+path;
View Full Code Here

Examples of org.apache.slide.authenticate.CredentialsToken

            (sourcecredential.getPrincipal().length()<=0)) {
            return;
        }

        this.sourcecredential = sourcecredential;
        this.credToken = new CredentialsToken(this.sourcecredential.getPrincipal());
        this.slideToken = new SlideTokenImpl(credToken);
    }
View Full Code Here

Examples of org.apache.slide.authenticate.CredentialsToken

            Structure structure = token.getStructureHelper();
            Security security = token.getSecurityHelper();
            Lock lock = token.getLockHelper();
            Content content = token.getContentHelper();
           
            CredentialsToken credToken =
                new CredentialsToken(new String("root"));
            SlideToken slideToken = new SlideToken(credToken);
           
            System.out.println("Loading objects from XML file");
           
            token.importData(slideToken, new FileReader("Import.xml"));
View Full Code Here

Examples of org.apache.slide.authenticate.CredentialsToken

        else if( P_GETCONTENTLANGUAGE.equals(propName) ) {
            result = "en";
        }
        else if( P_CREATOR_DISPLAYNAME.equals(propName) ) {
            if( sToken != null ) {
                CredentialsToken credToken = sToken.getCredentialsToken();
                if( credToken != null ) {
                    Principal p = credToken.getPrincipal();
                    if( p != null )
                        result = p.getName();
                    else
                        result = SubjectNode.UNAUTHENTICATED_URI;
                }
View Full Code Here

Examples of org.apache.slide.authenticate.CredentialsToken

     * @param principal Principal for whom the role is to be checked
     * @param role Security role to be checked
     */
    public boolean hasRole(Principal principal, String role) {

        CredentialsToken credToken = new CredentialsToken(principal);
        SlideToken slideToken = new SlideTokenImpl(credToken);
        try {
            return securityHelper.hasRole(slideToken, role);
        } catch (SlideException e) {
            return (false);
View Full Code Here

Examples of org.apache.slide.authenticate.CredentialsToken

     * Return the password associated with the given principal's user name.
     */
    protected String getPassword(String username) {
       
        Principal userPrincipal = getPrincipal(username);
        CredentialsToken credToken = new CredentialsToken(userPrincipal);
        SlideToken slideToken = new SlideTokenImpl(credToken);
       
        // Fetch the Slide object representing the user.
        try {
           
View Full Code Here

Examples of org.apache.slide.authenticate.CredentialsToken

        // Load Namespace Base Data
        try {
            // start transaction for temp object creation
            getTransactionManager().begin();
           
            SlideToken slideToken = new SlideTokenImpl(new CredentialsToken(""));
            slideToken.setForceStoreEnlistment(true);

            // First, we create the root node
            Uri rootUri = getUri(slideToken, "/");
            SubjectNode rootNode = new SubjectNode("/");
View Full Code Here

Examples of org.apache.slide.authenticate.CredentialsToken

            principal = (Principal) session.getAttribute(PRINCIPAL_ATTRIBUTE);
        } else {
            session.setAttribute(PRINCIPAL_ATTRIBUTE, principal);
        }
       
        CredentialsToken credentials;
        if (principal == null) {
            credentials = new CredentialsToken("");
        } else {
            credentials = new CredentialsToken(principal);
        }
       
        SlideToken token = new SlideTokenImpl(credentials);
        token.setEnforceLockTokens(true);
       
View Full Code Here

Examples of org.apache.slide.authenticate.CredentialsToken

        m_manager = manager;
    }

    public void initialize() throws SourceException {
       
        CredentialsToken credentials = new CredentialsToken(m_principal);
        m_slideToken = new SlideTokenImpl(credentials);
       
        m_structure = m_nat.getStructureHelper();
        m_content = m_nat.getContentHelper();
        m_lock = m_nat.getLockHelper();
View Full Code Here

Examples of org.apache.slide.authenticate.CredentialsToken

                               String password) throws Exception {
       
        String usersPath = nat.getNamespaceConfig().getUsersPath();
        String userUri = usersPath + "/" + username;
       
        SlideToken slideToken = new SlideTokenImpl(new CredentialsToken(caller));
        Structure structure = nat.getStructureHelper();
        Content content = nat.getContentHelper();
       
        try {
           
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.