Package org.eclipse.jetty.security

Examples of org.eclipse.jetty.security.DefaultUserIdentity


            }
            String user = userRolePair[0];

            String[] userRoles = userRolePair[1].split(",");
            if(principal.getName().equals(user)) {
                return new DefaultUserIdentity(subject, principal, userRoles);
            }
        }
        return new DefaultUserIdentity(subject, principal, guestRole);
    }
View Full Code Here


        if (!(authentication instanceof UserAuthentication)) {
            Subject theSubject = new Subject();
            String[] theRoles = new String[roles.size()];
            roles.toArray(theRoles);

            UserIdentity userIdentity = new DefaultUserIdentity(theSubject, principal, theRoles);
            authentication = new UserAuthentication(getAuthMethod(), userIdentity);
            request.setAuthentication(authentication);
        }
        return authentication;
    }
View Full Code Here

      principal = new DummyPrincipal("Hacker T. Admin", Roles.ADMIN);
    } else {
      principal = DummyPrincipal.NOBODY;
    }
    return new UserAuthentication(getAuthMethod(),
        new DefaultUserIdentity(null, principal, new String[] { principal.getRole() }));
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.security.DefaultUserIdentity

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.