Examples of UserAttribute


Examples of org.apache.jetspeed.om.portlet.UserAttribute

                description = securityRoleRef.getDescription(locale);
            }
        }
        else
        {
            UserAttribute attr = app.getUserAttribute(name);
            description = attr.getDescription(locale);
        }
       
        return new DescriptionBean(description);
    }
View Full Code Here

Examples of org.apache.pluto.container.om.portlet.UserAttribute

        }
        if (userAttribute != null)
        {
            for (UserAttributeType src : userAttribute)
            {
                UserAttribute target = app.addUserAttribute(src.name);
                if (src.description != null)
                {
                    for (DescriptionType d : src.description)
                    {
                        Description desc = target.addDescription(d.lang);
                        desc.setDescription(d.value);
                    }
                }
            }
        }
        if (securityConstraint != null)
        {
            for (SecurityConstraintType src : securityConstraint)
            {
                SecurityConstraint target = app.addSecurityConstraint(src.userDataConstraint.transportGuarantee);
                if (src.displayName != null)
                {
                    for (DisplayNameType d : src.displayName)
                    {
                        DisplayName dname = target.addDisplayName(d.lang);
                        dname.setDisplayName(d.value);
                    }
                }
                if (src.portletCollection != null && src.portletCollection.portletName != null)
                {
                    for (String pname : src.portletCollection.portletName)
                    {
                        target.addPortletName(pname);
                    }
                }
            }
        }
        return app;
View Full Code Here

Examples of org.apache.pluto.container.om.portlet.UserAttribute

        }
        if (userAttribute != null)
        {
            for (UserAttributeType src : userAttribute)
            {
                UserAttribute target = app.addUserAttribute(src.name);
                if (src.description != null)
                {
                    for (DescriptionType d : src.description)
                    {
                        Description desc = target.addDescription(d.lang);
                        desc.setDescription(d.value);
                    }
                }
            }
        }
        if (securityConstraint != null)
        {
            for (SecurityConstraintType src : securityConstraint)
            {
                SecurityConstraint target = app.addSecurityConstraint(src.userDataConstraint.transportGuarantee);
                if (src.displayName != null)
                {
                    for (DisplayNameType d : src.displayName)
                    {
                        DisplayName dname = target.addDisplayName(d.lang);
                        dname.setDisplayName(d.value);
                    }
                }
                if (src.portletCollection != null && src.portletCollection.portletName != null)
                {
                    for (String pname : src.portletCollection.portletName)
                    {
                        target.addPortletName(pname);
                    }
                }
            }
        }
        return app;
View Full Code Here

Examples of org.apache.roller.weblogger.pojos.UserAttribute

        getBean().setLocale(ud.getLocale());
        getBean().setTimeZone(ud.getTimeZone());
       
        UserManager mgr = WebloggerFactory.getWeblogger().getUserManager();
        try {
            UserAttribute openIdUrl = mgr.getUserAttribute(
                ud.getUserName(), UserAttribute.Attributes.OPENID_URL.toString());
            if (openIdUrl != null) {
                getBean().setOpenIdUrl(openIdUrl.getValue());
            }
        } catch (Exception ex) {
            log.error("Unexpected error loading user OpenID url", ex);
            addError("error in action", ex.toString());
        }
View Full Code Here

Examples of org.jboss.resteasy.skeleton.key.idm.model.data.UserAttribute

         if (userRep.getAttributes() != null)
         {
            for (Map.Entry<String, String> entry : userRep.getAttributes().entrySet())
            {
               UserAttribute attribute = new UserAttribute();
               attribute.setName(entry.getKey());
               attribute.setValue(entry.getValue());
               identityManager.create(user, attribute);
            }
         }
      }
View Full Code Here

Examples of org.springframework.security.core.userdetails.memory.UserAttribute

            @Inject @Value( "${spring-security.anonymous.key}" ) final String anonymousKey ) throws Exception {

       
        final UserAttributeEditor attrEditor = new UserAttributeEditor();
        attrEditor.setAsText( anonymousAttr );
        final UserAttribute attr = (UserAttribute) attrEditor.getValue();
       
        final AnonymousAuthenticationFilter filter = new AnonymousAuthenticationFilter(anonymousKey,"anonymousUser",attr.getAuthorities());
        filter.afterPropertiesSet();
        return new HttpServletRequestFilterWrapper( filter );
    }
View Full Code Here

Examples of org.springframework.security.core.userdetails.memory.UserAttribute

            @Inject @Value( "${spring-security.anonymous.key}" ) final String anonymousKey ) throws Exception {

       
        final UserAttributeEditor attrEditor = new UserAttributeEditor();
        attrEditor.setAsText( anonymousAttr );
        final UserAttribute attr = (UserAttribute) attrEditor.getValue();
       
        final AnonymousAuthenticationFilter filter = new AnonymousAuthenticationFilter(anonymousKey,"anonymousUser",attr.getAuthorities());
        filter.afterPropertiesSet();
        return new HttpServletRequestFilterWrapper( filter );
    }
View Full Code Here

Examples of org.springframework.security.core.userdetails.memory.UserAttribute

    public void testCorrectOperationWithTrailingSpaces() {
        UserAttributeEditor editor = new UserAttributeEditor();
        editor.setAsText("password ,ROLE_ONE,ROLE_TWO ");

        UserAttribute user = (UserAttribute) editor.getValue();
        assertEquals("password", user.getPassword());
        assertEquals(2, user.getAuthorities().size());
        assertEquals("ROLE_ONE", user.getAuthorities().get(0).getAuthority());
        assertEquals("ROLE_TWO", user.getAuthorities().get(1).getAuthority());
    }
View Full Code Here

Examples of org.springframework.security.core.userdetails.memory.UserAttribute

    public void testCorrectOperationWithoutEnabledDisabledKeyword() {
        UserAttributeEditor editor = new UserAttributeEditor();
        editor.setAsText("password,ROLE_ONE,ROLE_TWO");

        UserAttribute user = (UserAttribute) editor.getValue();
        assertTrue(user.isValid());
        assertTrue(user.isEnabled()); // default
        assertEquals("password", user.getPassword());
        assertEquals(2, user.getAuthorities().size());
        assertEquals("ROLE_ONE", user.getAuthorities().get(0).getAuthority());
        assertEquals("ROLE_TWO", user.getAuthorities().get(1).getAuthority());
    }
View Full Code Here

Examples of org.springframework.security.core.userdetails.memory.UserAttribute

    public void testDisabledKeyword() {
        UserAttributeEditor editor = new UserAttributeEditor();
        editor.setAsText("password,disabled,ROLE_ONE,ROLE_TWO");

        UserAttribute user = (UserAttribute) editor.getValue();
        assertTrue(user.isValid());
        assertTrue(!user.isEnabled());
        assertEquals("password", user.getPassword());
        assertEquals(2, user.getAuthorities().size());
        assertEquals("ROLE_ONE", user.getAuthorities().get(0).getAuthority());
        assertEquals("ROLE_TWO", user.getAuthorities().get(1).getAuthority());
    }
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.