1 17 package org.apache.geronimo.jetty; 18 19 import java.security.Principal ; 20 import java.util.Stack ; 21 import javax.security.auth.Subject ; 22 23 24 27 public class JAASJettyPrincipal implements Principal { 28 private final String name; 29 private Subject subject; 30 private final Stack stack = new Stack (); 31 32 public JAASJettyPrincipal(String name) { 33 this.name = name; 34 } 35 36 public String getName() { 37 return name; 38 } 39 40 public Subject getSubject() { 41 return subject; 42 } 43 44 public void setSubject(Subject subject) { 45 this.subject = subject; 46 } 47 48 void push(Subject roleDesignate) { 49 stack.push(roleDesignate); 50 } 51 52 Subject pop() { 53 return (Subject ) stack.pop(); 54 } 55 } 56 | Popular Tags |