freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

[計(jì)算機(jī)軟件及應(yīng)用]cas配置指南-資料下載頁

2025-08-17 04:22本頁面
  

【正文】 t=utf8 pageEncoding=utf8%%@ taglib prefix=c uri=%%@ taglib prefix=spring uri=%htmlheadscript type=text/javascript var remoteUrl = ${remoteLoginUrl}?validated=true。 // 構(gòu)造錯(cuò)誤消息 var errorMessage = 。 spring:hasBindErrors name=credentials errorMessage = amp。errorMessage= + encodeURIComponent(39。c:forEach var=error items=${}spring:message code=${} text=${} //c:forEach39。)。 /spring:hasBindErrors // 構(gòu)造service var serivce = ${service }。 if (serivce != amp。amp。 serivce != null) { service = amp。service= + encodeURIComponent(${service})。 } // 跳轉(zhuǎn)回去 = remoteUrl + errorMessage + service。/script/headbody${remoteLoginMessage}/body/html以上文件注意黃色背景部分validated=true,這里我們與客戶端約定,當(dāng)客戶端登陸頁面后帶有參數(shù)validated=true時(shí),不進(jìn)行票據(jù)認(rèn)證請求。這是因?yàn)?,客戶端登陸頁面?//clienthost/,那么當(dāng)用戶訪問URL ://clienthost/,客戶端會(huì)重定向到CAS中央服務(wù)器請求TGT認(rèn)證,但認(rèn)證失敗后CAS中央認(rèn)證服務(wù)器會(huì)重定向到客戶端登陸頁面并顯示登陸框,此時(shí)客戶端必須以某種規(guī)則避免重新請求中央認(rèn)證服務(wù)器認(rèn)證, 在這里我們與客戶端約定,當(dāng)回發(fā)的請求為登陸頁面且?guī)в袇?shù)validated=true時(shí)即不轉(zhuǎn)發(fā)TGT認(rèn)證請求,即 ://clienthost/?validated=true 請求客戶端不會(huì)重新發(fā)送TGT認(rèn)證請求給中央認(rèn)證服務(wù)器。 客戶端配置webxml修改filter: filter filternameCAS Authentication Filter/filtername filterclass/filterclass initparam paramnamelocalLoginUrl/paramname paramvalue://localhost:8080/casclient//paramvalue /initparam initparam paramnamecasServerLoginUrl/paramname paramvalue://johnpc:8443/cas/remoteLogin/paramvalue /initparam initparam paramnameserverName/paramname paramvalue://localhost:8080/paramvalue /initparam /filter filtermapping filternameCAS Authentication Filter/filtername urlpattern/*/urlpattern /filtermapping:package 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。/** * 遠(yuǎn)程認(rèn)證過濾器. 由于AuthenticationFilter的doFilter方法被聲明為final, * 只好重新實(shí)現(xiàn)一個(gè)認(rèn)證過濾器,支持localLoginUrl設(shè)置. * * @author GuoLin * */public class RemoteAuthenticationFilter extends AbstractCasFilter { /** * 本地登陸頁面URL. */ private String localLoginUrl。 /** * The URL to the CAS Server login. */ private String casServerLoginUrl。 /** * Whether to send the renew request or not. */ private boolean renew = false。 /** * Whether to send the gateway request or not. */ private boolean gateway = false。 private GatewayResolver gatewayStorage = new DefaultGatewayResolverImpl()。 public final void doFilter(final ServletRequest servletRequest, final ServletResponse servletResponse, final FilterChain filterChain) throws IOException, ServletException { final HttpServletRequest request = (HttpServletRequest) servletRequest。 final HttpServletResponse response = (HttpServletResponse) servletResponse。 final HttpSession session = (false)。 final Assertion assertion = session != null ? (Assertion) session .getAttribute(CONST_CAS_ASSERTION) : null。 if (assertion != null) { (request, response)。 return。 } final String serviceUrl = constructServiceUrl(request, response)。 final String ticket = (request, getArtifactParameterName())。 final boolean wasGatewayed = ( request, serviceUrl)。 // 如果訪問路徑為localLoginUrl且?guī)в衯alidated參數(shù)則跳過 URL url = new URL(localLoginUrl)。 final boolean isValidatedLocalLoginUrl = () .endsWith(()) amp。amp。 ((validated))。 if (!isValidatedLocalLoginUrl amp。 (ticket) || wasGatewayed) { (request, response)。 return。 } final String modifiedServiceUrl。 (no ticket and no assertion found)。 if () { (setting gateway attribute in session)。 modifiedServiceUrl = ( request, serviceUrl)。 } else { modifiedServiceUrl = serviceUrl。 } if (()) { (Constructed service url: + modifiedServiceUrl)。 } String urlToRedirectTo = ( , getServiceParameterName(), modifiedServiceUrl, , )。 // 加入localLoginUrl urlToRedirectTo += ((?) ? amp。 : ?) + loginUrl= + (localLoginUrl, utf8)。 if (()) { (redirecting to \ + urlToRedirectTo + \)。 } (urlToRedirectTo)。 } public void init() { ()。 (, localLoginUrl cannot be null.)。 (, casServerLoginUrl cannot be null.)。 } protected void initInternal(final FilterConfig filterConfig) throws ServletException { if (!isIgnoreInitConfiguration()) { (filterConfig)。 setCasServerLoginUrl(getPropertyFromInitParams(filterConfig, casServerLoginUrl, null))。 (Loaded CasServerLoginUrl parameter: + )。 setLocalLoginUrl(getPropertyFromInitParams(filterConfig, localLoginUrl, null))。 (Loaded LocalLoginUrl parameter: + )。 setRenew(parseBoolean(getPropertyFromInitParams(filterConfig, renew, false)))。 (Loaded renew parameter: + )。 setGateway(parseBoolean(getPropertyFromInitParams(filterConfig, gateway, false)))。 (Loaded gateway parameter: + )。 final String gatewayStorageClass = getPropertyFromInitParams( filterConfig, gatewayStorageClass, null)。 if (gatewayStorageClass != null) { try { = (GatewayResolver) ( gatewayStorageClass).newInstance()。 } catch (final Exception e) { (e, e)。 throw new ServletException(e)。 } } } } public final void setCasServerLoginUrl(final String casServerLoginUrl) { = casServerLoginUrl。 } public final void setGateway(final boolean gateway) { = gateway。 } public final void setGatewayStorage(final GatewayResolver gatewayStorage) { = gatewayStorage。 } public final void setLocalLoginUrl(String localLoginUrl) { = localLoginUrl。 } public final void setRenew(final boolean renew) { = renew。 }}以上黃色部分的代碼為
點(diǎn)擊復(fù)制文檔內(nèi)容
化學(xué)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1