Package org.apache.clerezza.platform.security.auth

Examples of org.apache.clerezza.platform.security.auth.PrincipalImpl


  public static final Principal ANONYMOUS = new PrincipalImpl("anonymous");

  public static Subject createSubject(String userName) {
    return new Subject(true,
      Collections.singleton(new PrincipalImpl(userName)), Collections.EMPTY_SET,
      Collections.EMPTY_SET);
  }
View Full Code Here


  public void testImpliesSelf() {
    final Permission userX = new MailManPermission("userNameX", MailManPermission.SEND_FROM);
    final Permission self = new MailManPermission(MailManPermission.SELF_ACTION, MailManPermission.SEND_FROM);

    Subject subject = new Subject(true,
        Collections.singleton(new PrincipalImpl("userNameX")),
        Collections.EMPTY_SET,
        Collections.EMPTY_SET);
    Subject.doAs(subject, new PrivilegedAction<Object>() {
      @Override
      public Object run() {
View Full Code Here

TOP

Related Classes of org.apache.clerezza.platform.security.auth.PrincipalImpl

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.