1 22 package org.jboss.web.tomcat.security; 23 24 import java.security.Principal ; 25 import java.util.List ; 26 import java.util.Set ; 27 import javax.security.auth.Subject ; 28 29 import org.apache.catalina.Realm; 30 import org.apache.catalina.realm.GenericPrincipal; 31 32 40 class JBossGenericPrincipal 41 extends GenericPrincipal 42 { 43 44 private Principal authPrincipal = null; 45 46 private Principal callerPrincipal = null; 47 48 private Object credentials = null; 49 50 private Subject subject = null; 51 52 private Set userRoles = null; 53 54 67 JBossGenericPrincipal(Realm realm, Subject subject, 68 Principal authPrincipal, Principal callerPrincipal, 69 Object credentials, List roles, Set userRoles) 70 { 71 super(realm, callerPrincipal.getName(), null, roles, callerPrincipal); 72 this.credentials = credentials; 73 this.authPrincipal = authPrincipal; 74 this.callerPrincipal = callerPrincipal; 75 this.subject = subject; 76 this.userRoles = userRoles; 77 } 78 79 Principal getAuthPrincipal() 80 { 81 return this.authPrincipal; 82 } 83 88 Principal getCallerPrincipal() 89 { 90 return this.callerPrincipal; 91 } 92 93 98 Object getCredentials() 99 { 100 return this.credentials; 101 } 102 103 Subject getSubject() 104 { 105 return subject; 106 } 107 108 112 Set getUserRoles() 113 { 114 return userRoles; 115 } 116 } 117 | Popular Tags |