1 package com.opensymphony.webwork.interceptor; 2 3 import javax.servlet.http.HttpServletRequest ; 4 import java.security.Principal ; 5 6 13 public class PrincipalProxy { 14 private HttpServletRequest request; 15 16 public PrincipalProxy(HttpServletRequest request) { 17 this.request = request; 18 } 19 20 public boolean isUserInRole(String role) { 21 return request.isUserInRole(role); 22 } 23 24 public Principal getUserPrincipal() { 25 return request.getUserPrincipal(); 26 } 27 28 public String getRemoteUser() { 29 return request.getRemoteUser(); 30 } 31 32 public boolean isRequestSecure() { 33 return request.isSecure(); 34 } 35 36 public HttpServletRequest getRequest() { 37 return request; 38 } 39 } 40 | Popular Tags |