diff src/org/eclipse/jetty/server/Request.java @ 813:f8f7cb485c25

remove UserIdentity
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 08 Sep 2016 22:01:33 -0600
parents 1bedcd0ec275
children 07c82fabc46b
line wrap: on
line diff
--- a/src/org/eclipse/jetty/server/Request.java	Thu Sep 08 21:44:37 2016 -0600
+++ b/src/org/eclipse/jetty/server/Request.java	Thu Sep 08 22:01:33 2016 -0600
@@ -209,7 +209,6 @@
 	private Object _requestAttributeListeners;
 	private String _requestURI;
 	private String _scheme = URIUtil.HTTP;
-	private UserIdentity.Scope _scope;
 	private String _serverName;
 	private String _servletPath;
 	private long _timeStamp;
@@ -1206,16 +1205,6 @@
 
 	/* ------------------------------------------------------------ */
 	/*
-	 */
-	public String getServletName()
-	{
-		if (_scope != null)
-			return _scope.getName();
-		return null;
-	}
-
-	/* ------------------------------------------------------------ */
-	/*
 	 * @see javax.servlet.http.HttpServletRequest#getServletPath()
 	 */
 	public String getServletPath()
@@ -1283,35 +1272,6 @@
 	}
 
 	/* ------------------------------------------------------------ */
-	public UserIdentity getUserIdentity()
-	{
-		if (_authentication instanceof Authentication.Deferred)
-			setAuthentication(((Authentication.Deferred)_authentication).authenticate(this));
-
-		if (_authentication instanceof Authentication.User)
-			return ((Authentication.User)_authentication).getUserIdentity();
-		return null;
-	}
-
-	/* ------------------------------------------------------------ */
-	/**
-	 * @return The resolved user Identity, which may be null if the {@link Authentication} is not {@link Authentication.User} (eg.
-	 *         {@link Authentication.Deferred}).
-	 */
-	public UserIdentity getResolvedUserIdentity()
-	{
-		if (_authentication instanceof Authentication.User)
-			return ((Authentication.User)_authentication).getUserIdentity();
-		return null;
-	}
-
-	/* ------------------------------------------------------------ */
-	public UserIdentity.Scope getUserIdentityScope()
-	{
-		return _scope;
-	}
-
-	/* ------------------------------------------------------------ */
 	/*
 	 * @see javax.servlet.http.HttpServletRequest#getUserPrincipal()
 	 */
@@ -1320,12 +1280,6 @@
 		if (_authentication instanceof Authentication.Deferred)
 			setAuthentication(((Authentication.Deferred)_authentication).authenticate(this));
 
-		if (_authentication instanceof Authentication.User)
-		{
-			UserIdentity user = ((Authentication.User)_authentication).getUserIdentity();
-			return user.getUserPrincipal();
-		}
-		
 		return null;
 	}
 
@@ -1411,9 +1365,6 @@
 	{
 		if (_authentication instanceof Authentication.Deferred)
 			setAuthentication(((Authentication.Deferred)_authentication).authenticate(this));
-
-		if (_authentication instanceof Authentication.User)
-			return ((Authentication.User)_authentication).isUserInRole(_scope,role);
 		return false;
 	}
 
@@ -1463,7 +1414,6 @@
 		_queryEncoding = null;
 		_queryString = null;
 		_requestURI = null;
-		_scope = null;
 		_scheme = URIUtil.HTTP;
 		_servletPath = null;
 		_timeStamp = 0;
@@ -1886,12 +1836,6 @@
 	}
 
 	/* ------------------------------------------------------------ */
-	public void setUserIdentityScope(UserIdentity.Scope scope)
-	{
-		_scope = scope;
-	}
-
-	/* ------------------------------------------------------------ */
 	/**
 	 * Set timetstamp of request dispatch
 	 *