Package org.jboss.resteasy.skeleton.key.idm.model.data

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


      List<UserCredential> list = new ArrayList<UserCredential>();
      if (creds != null)
      {
         for (String id : creds)
         {
            UserCredential cred = getCredential(id);
            list.add(cred);
         }
      }
      return list;
   }
View Full Code Here


            String value = formData.getFirst(credential.getType());
            if (value == null)
            {
               return false;
            }
            UserCredential userCredential = userCredentials.getFirst(credential.getType());
            if (userCredential == null)
            {
               logger.warn("Missing required user credential");
               return false;
            }
            if (userCredential.isHashed())
            {
               value = hash(value);
            }
            if (!value.equals(userCredential.getValue()))
            {
               logger.warn("Credential mismatch");
               return false;
            }
         }
         else
         {
            if (credential.getType().equals(RequiredCredentialRepresentation.CALLER_PRINCIPAL))
            {
               List<UserCredential> principals = userCredentials.get(RequiredCredentialRepresentation.CALLER_PRINCIPAL);
               if (principals == null) return false;
               boolean found = false;
               for (UserCredential userCredential : principals)
               {
                  if (userCredential.getValue().equals(securityContext.getUserPrincipal().getName()))
                  {
                     found = true;
                     break;
                  }
               }
View Full Code Here

         userMap.put(user.getUsername(), user);
         if (userRep.getCredentials() != null)
         {
            for (UserRepresentation.Credential cred : userRep.getCredentials())
            {
               UserCredential credential = new UserCredential();
               credential.setType(cred.getType());
               credential.setValue(cred.getValue());
               credential.setHashed(cred.isHashed());
               identityManager.create(user, credential);
            }
         }

         if (userRep.getAttributes() != null)
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.skeleton.key.idm.model.data.UserCredential

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.