Examples of CredentialsToken


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

        this.resp = resp;
        this.slideToken = WebdavUtils.getSlideToken(req);
        String forceLowercaseLogin = token.getNamespaceConfig().getParameter("force-lowercase-login");
        if ("true".equals(forceLowercaseLogin)) {
            String name = slideToken.getCredentialsToken().getPrincipal().getName().toLowerCase();
            slideToken.setCredentialsToken(new CredentialsToken(name));
        }
       
        this.requestUri = WebdavUtils.getRelativePath(req, config);
        this.slideContextPath = req.getContextPath();
        if (!this.config.isDefaultServlet()) {
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 ) {
                    result = credToken.getPublicCredentials();
                    if (result == null || result.equals("") || result.equals("/")) {
                        result = SubjectNode.UNAUTHENTICATED_URI;
                    }
                }
            }
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

            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 SlideTokenImpl(credToken);
               
            SubjectNode subject = new SubjectNode();

            String myUri = null;
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.