Examples of asPrincipal()


Examples of org.jboss.security.identity.Identity.asPrincipal()

        boolean authenticated = false;
        if (principal == null) {
            Identity unauthenticatedIdentity = getUnauthenticatedIdentity();
            subjectInfo.addIdentity(unauthenticatedIdentity);
            subject.getPrincipals().add(unauthenticatedIdentity.asPrincipal());
            authenticated = true;
        }

        if (authenticated == false) {
            AuthenticationManager authenticationManager = context.getAuthenticationManager();
View Full Code Here

Examples of org.jboss.security.identity.Identity.asPrincipal()

        boolean authenticated = false;
        if (principal == null) {
            Identity unauthenticatedIdentity = getUnauthenticatedIdentity();
            subjectInfo.addIdentity(unauthenticatedIdentity);
            subject.getPrincipals().add(unauthenticatedIdentity.asPrincipal());
            authenticated = true;
        }

        if (authenticated == false) {
            AuthenticationManager authenticationManager = context.getAuthenticationManager();
View Full Code Here

Examples of org.jboss.security.identity.extensions.CredentialIdentity.asPrincipal()

      Principal p = null;
      SubjectInfo subjectInfo = this.securityContext.getSubjectInfo();
      if(subjectInfo != null)
      {
         CredentialIdentity cIdentity = subjectInfo.getIdentity(CredentialIdentity.class);
         p = cIdentity != null ? cIdentity.asPrincipal() : null;
      }
      return p;
   }
  
   public Object getCredential()
View Full Code Here

Examples of org.jboss.security.identity.extensions.CredentialIdentity.asPrincipal()

   {
      if(theSubjectInfo != null)
      {
         CredentialIdentity identity = theSubjectInfo.getIdentity(CredentialIdentity.class);
         if(identity != null)
           return identity.asPrincipal();
      }
      return null;
   }
  
   public Object getCredential()
View Full Code Here

Examples of org.jboss.security.identity.extensions.CredentialIdentity.asPrincipal()

                .iterator();

        while (iterator.hasNext()) {
            CredentialIdentity identity = (CredentialIdentity) iterator.next();

            principal = identity.asPrincipal();
            credential = identity.getCredential();
        }

        Subject subject = new Subject();
View Full Code Here

Examples of org.jboss.security.identity.plugins.SimpleIdentity.asPrincipal()

               if(userPrincipal == null && unauthenticatedPrincipal !=null &&
                     unauthenticatedPrincipal.length() > 0)
               {
                  Identity unauthenticatedIdentity = new SimpleIdentity(unauthenticatedPrincipal);
                  sc.getSubjectInfo().addIdentity(unauthenticatedIdentity);
                  subject.getPrincipals().add(unauthenticatedIdentity.asPrincipal());
               }
               else
               {
                  //Authenticate the caller now
                  if(!helper.isValid(subject, method.getName()))
View Full Code Here

Examples of org.jboss.security.identity.plugins.SimpleIdentity.asPrincipal()

               if(userPrincipal == null && unauthenticatedPrincipal !=null &&
                     unauthenticatedPrincipal.length() > 0)
               {
                  Identity unauthenticatedIdentity = new SimpleIdentity(unauthenticatedPrincipal);
                  sc.getSubjectInfo().addIdentity(unauthenticatedIdentity);
                  subject.getPrincipals().add(unauthenticatedIdentity.asPrincipal());
               }
               else
               {
                  //Authenticate the caller now
                  if(!helper.isValid(subject, method.getName()))
View Full Code Here

Examples of org.jboss.security.identity.plugins.SimpleIdentity.asPrincipal()

            if(sc.getUtil().getUserPrincipal() == null && unauthenticatedPrincipal !=null &&
                  unauthenticatedPrincipal.length() > 0)
            {
               Identity unauthenticatedIdentity = new SimpleIdentity(unauthenticatedPrincipal);
               sc.getSubjectInfo().addIdentity(unauthenticatedIdentity);
               subject.getPrincipals().add(unauthenticatedIdentity.asPrincipal());
            }
            else
            {
               //Authenticate the caller now
               if(!helper.isValid(subject, method.getName()))
View Full Code Here

Examples of org.jboss.security.identity.plugins.SimpleIdentity.asPrincipal()

               if(userPrincipal == null && unauthenticatedPrincipal !=null &&
                     unauthenticatedPrincipal.length() > 0)
               {
                  Identity unauthenticatedIdentity = new SimpleIdentity(unauthenticatedPrincipal);
                  sc.getSubjectInfo().addIdentity(unauthenticatedIdentity);
                  subject.getPrincipals().add(unauthenticatedIdentity.asPrincipal());
               }
               else
               {
                  //Authenticate the caller now
                  if(!helper.isValid(subject, method.getName()))
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.