ASF Bugzilla – Attachment 26648 Details for
Bug 50771
HttpServletRequest#getAuthType() returns null though the request is authenticated.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
I made a patch.
patch.txt (text/plain), 2.99 KB, created by
Keiichi Fujino
on 2011-02-14 03:30:02 UTC
(
hide
)
Description:
I made a patch.
Filename:
MIME Type:
Creator:
Keiichi Fujino
Created:
2011-02-14 03:30:02 UTC
Size:
2.99 KB
patch
obsolete
>Index: java/org/apache/catalina/ha/session/DeltaSession.java >=================================================================== >--- java/org/apache/catalina/ha/session/DeltaSession.java (revision 1059714) >+++ java/org/apache/catalina/ha/session/DeltaSession.java (working copy) >@@ -338,6 +338,28 @@ > } > > /** >+ * Set the authentication type used to authenticate our cached >+ * Principal, if any. >+ * >+ * @param authType The new cached authentication type >+ */ >+ @Override >+ public void setAuthType(String authType) { >+ setAuthType(authType, true); >+ } >+ >+ public void setAuthType(String authType, boolean addDeltaRequest) { >+ try { >+ lock(); >+ super.setAuthType(authType); >+ if (addDeltaRequest && (deltaRequest != null)) >+ deltaRequest.setAuthType(authType); >+ } finally { >+ unlock(); >+ } >+ } >+ >+ /** > * Return the <code>isValid</code> flag for this session. > */ > @Override >Index: java/org/apache/catalina/ha/session/DeltaRequest.java >=================================================================== >--- java/org/apache/catalina/ha/session/DeltaRequest.java (revision 1059715) >+++ java/org/apache/catalina/ha/session/DeltaRequest.java (working copy) >@@ -53,6 +53,7 @@ > public static final int TYPE_PRINCIPAL = 1; > public static final int TYPE_ISNEW = 2; > public static final int TYPE_MAXINTERVAL = 3; >+ public static final int TYPE_AUTHTYPE = 4; > > public static final int ACTION_SET = 0; > public static final int ACTION_REMOVE = 1; >@@ -60,6 +61,7 @@ > public static final String NAME_PRINCIPAL = "__SET__PRINCIPAL__"; > public static final String NAME_MAXINTERVAL = "__SET__MAXINTERVAL__"; > public static final String NAME_ISNEW = "__SET__ISNEW__"; >+ public static final String NAME_AUTHTYPE = "__SET__AUTHTYPE__"; > > private String sessionId; > private LinkedList<AttributeInfo> actions = new LinkedList<AttributeInfo>(); >@@ -119,6 +121,11 @@ > addAction(TYPE_ISNEW,action,NAME_ISNEW,Boolean.valueOf(n)); > } > >+ public void setAuthType(String authType) { >+ int action = (authType==null)?ACTION_REMOVE:ACTION_SET; >+ addAction(TYPE_AUTHTYPE,action,NAME_AUTHTYPE, authType); >+ } >+ > protected void addAction(int type, > int action, > String name, >@@ -185,6 +192,14 @@ > session.setPrincipal(p,false); > break; > }//case >+ case TYPE_AUTHTYPE: { >+ String authType = null; >+ if ( info.getAction() == ACTION_SET ) { >+ authType = (String)info.getValue(); >+ } >+ session.setAuthType(authType,false); >+ break; >+ }//case > default : throw new java.lang.IllegalArgumentException("Invalid attribute info type="+info); > }//switch > }//for
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 50771
: 26648 |
26649
|
26650