Package org.jboss.security.mapping

Examples of org.jboss.security.mapping.MappingManager


      MappingInfo attributeMappingInfo = new MappingInfo();
      attributeMappingInfo.add(mme);
      ap.setMappingInfo(MappingType.ATTRIBUTE.name(),attributeMappingInfo);
     
      SecurityContext sc = SecurityContextFactory.createSecurityContext("test");
      MappingManager mm = sc.getMappingManager();
      assertNotNull("MappingManager != null", mm);
     
      MappingContext<List<Attribute<String>>> mc = mm.getMappingContext(MappingType.ATTRIBUTE.name());
      assertNotNull("MappingContext != null", mc);
      HashMap<String,Object> map = new HashMap<String,Object>();
    
      map.put(SecurityConstants.PRINCIPAL_IDENTIFIER, new SimplePrincipal("jduke"));
     
View Full Code Here


        return itm;
    }

    /** {@inheritDoc} */
    public MappingManager getMappingManager(String securityDomain) {
        MappingManager mm = null;
        try {
            mm = mappingMgrMap.get(securityDomain);
            if (mm == null) {
                mm = (MappingManager) lookUpJNDI(securityDomain + "/mappingMgr");
                mappingMgrMap.put(securityDomain, mm);
View Full Code Here

       * allow mapping rules be applied only if the SC roles
       * and the subject roles are not the same
       */
      if(subjectRoles != userRoles || emptyContextRoles)
      {
         MappingManager mm = sc.getMappingManager();
         MappingContext<RoleGroup> mc = mm.getMappingContext(RoleGroup.class);
       
         RoleGroup mappedUserRoles = userRoles;
         if(mc != null && mc.hasModules())
         {
            Map<String,Object> contextMap = new HashMap<String,Object>();
View Full Code Here

       * allow mapping rules be applied only if the SC roles
       * and the subject roles are not the same
       */
      if(subjectRoles != userRoles || emptyContextRoles)
      {
         MappingManager mm = sc.getMappingManager();
         MappingContext mc = mm.getMappingContext(Group.class);
         if(mc != null)
         {
            Map contextMap = new HashMap();
            contextMap.put(SecurityConstants.ROLES_IDENTIFIER, userRoles);
            contextMap.put(SecurityConstants.PRINCIPAL_IDENTIFIER, principal);
View Full Code Here

/* 175 */     return am;
/*     */   }
/*     */
/*     */   public MappingManager getMappingManager(String securityDomain)
/*     */   {
/* 180 */     MappingManager am = null;
/*     */     try
/*     */     {
/* 183 */       am = (MappingManager)this.mappingMgrMap.get(securityDomain);
/* 184 */       if (am == null)
/*     */       {
View Full Code Here

/* 346 */       emptyContextRoles = true;
/* 347 */     userRoles = copyGroups(userRoles, subjectRoles);
/*     */
/* 354 */     if ((subjectRoles != userRoles) || (emptyContextRoles))
/*     */     {
/* 356 */       MappingManager mm = sc.getMappingManager();
/* 357 */       MappingContext mc = mm.getMappingContext(Group.class);
/* 358 */       Group mappedUserRoles = userRoles;
/* 359 */       if (mc != null)
/*     */       {
/* 361 */         Map contextMap = new HashMap();
/* 362 */         contextMap.put("Roles", userRoles);
View Full Code Here

/* 230 */     String lookupURL = null;
/* 231 */     if (securityDomain.startsWith(baseContext))
/* 232 */       lookupURL = securityDomain + mappingManagerURL;
/*     */     else
/* 234 */       lookupURL = baseContext + "/" + securityDomain + mappingManagerURL;
/* 235 */     MappingManager am = null;
/*     */     try
/*     */     {
/* 238 */       InitialContext ic = new InitialContext();
/* 239 */       am = (MappingManager)ic.lookup(lookupURL);
/*     */     }
View Full Code Here

       * allow mapping rules be applied only if the SC roles
       * and the subject roles are not the same
       */
      if(subjectRoles != userRoles || emptyContextRoles)
      {
         MappingManager mm = sc.getMappingManager();
         MappingContext<RoleGroup> mc = mm.getMappingContext(RoleGroup.class);
       
         RoleGroup mappedUserRoles = userRoles;
         if(mc != null && mc.hasModules())
         {
            Map<String,Object> contextMap = new HashMap<String,Object>();
View Full Code Here

        return itm;
    }

    /** {@inheritDoc} */
    public MappingManager getMappingManager(String securityDomain) {
        MappingManager mm = null;
        try {
            mm = mappingMgrMap.get(securityDomain);
            if (mm == null) {
                mm = (MappingManager) lookUpJNDI(securityDomain + "/mappingMgr");
                mappingMgrMap.put(securityDomain, mm);
View Full Code Here

        Map<String, Object> attributeMap = new HashMap<String, Object>();

        SecurityContext sc = SecurityActions.getSecurityContext();
        if (sc != null) {
            String mappingType = MappingType.ATTRIBUTE.name();
            MappingManager mm = sc.getMappingManager();
            MappingContext<List<Attribute<Object>>> mc = mm.getMappingContext(mappingType);

            if (mc == null) {
                logger.mappingContextNull();
                return attributeMap;
            }
View Full Code Here

TOP

Related Classes of org.jboss.security.mapping.MappingManager

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.