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;
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>();
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,
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
}
/**
+ * 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
</fix>
</changelog>
</subsection>
+ <subsection name="Cluster">
+ <changelog>
+ <fix>
+ <bug>50771</bug>: Ensure HttpServletRequest#getAuthType() returns the
+ name of the authentication scheme if request has already been
+ authenticated. (kfujino)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Tribes">
<changelog>
<fix>