本文整理汇总了Java中org.jasig.cas.logout.LogoutRequestStatus.NOT_ATTEMPTED属性的典型用法代码示例。如果您正苦于以下问题:Java LogoutRequestStatus.NOT_ATTEMPTED属性的具体用法?Java LogoutRequestStatus.NOT_ATTEMPTED怎么用?Java LogoutRequestStatus.NOT_ATTEMPTED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.jasig.cas.logout.LogoutRequestStatus
的用法示例。
在下文中一共展示了LogoutRequestStatus.NOT_ATTEMPTED属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doInternalExecute
@Override
protected Event doInternalExecute(final HttpServletRequest request, final HttpServletResponse response,
final RequestContext context) throws Exception {
final List<LogoutRequest> logoutRequests = WebUtils.getLogoutRequests(context);
final Integer startIndex = getLogoutIndex(context);
if (logoutRequests != null) {
for (int i = startIndex; i < logoutRequests.size(); i++) {
final LogoutRequest logoutRequest = logoutRequests.get(i);
if (logoutRequest.getStatus() == LogoutRequestStatus.NOT_ATTEMPTED) {
// assume it has been successful
logoutRequest.setStatus(LogoutRequestStatus.SUCCESS);
// save updated index
putLogoutIndex(context, i + 1);
final String logoutUrl = logoutRequest.getLogoutUrl().toExternalForm();
LOGGER.debug("Using logout url [{}] for front-channel logout requests", logoutUrl);
final String logoutMessage = logoutManager.createFrontChannelLogoutMessage(logoutRequest);
LOGGER.debug("Front-channel logout message to send under [{}] is [{}]",
this.logoutRequestParameter, logoutMessage);
// redirect to application with SAML logout message
final UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(logoutUrl);
builder.queryParam(this.logoutRequestParameter, URLEncoder.encode(logoutMessage, "UTF-8"));
return result(REDIRECT_APP_EVENT, DEFAULT_FLOW_ATTRIBUTE_LOGOUT_URL, builder.build().toUriString());
}
}
}
// no new service with front-channel logout -> finish logout
return new Event(this, FINISH_EVENT);
}
示例2: doInternalExecute
@Override
protected Event doInternalExecute(final HttpServletRequest request, final HttpServletResponse response,
final RequestContext context) throws Exception {
boolean needFrontSlo = false;
putLogoutIndex(context, 0);
final List<LogoutRequest> logoutRequests = WebUtils.getLogoutRequests(context);
if (logoutRequests != null) {
for (final LogoutRequest logoutRequest : logoutRequests) {
// if some logout request must still be attempted
if (logoutRequest.getStatus() == LogoutRequestStatus.NOT_ATTEMPTED) {
needFrontSlo = true;
break;
}
}
}
final String service = request.getParameter(CasProtocolConstants.PARAMETER_SERVICE);
if (this.followServiceRedirects && service != null) {
final Service webAppService = new WebApplicationServiceFactory().createService(service);
final RegisteredService rService = this.servicesManager.findServiceBy(webAppService);
if (rService != null && rService.getAccessStrategy().isServiceAccessAllowed()) {
context.getFlowScope().put("logoutRedirectUrl", service);
}
}
// there are some front services to logout, perform front SLO
if (needFrontSlo) {
return new Event(this, FRONT_EVENT);
} else {
// otherwise, finish the logout process
return new Event(this, FINISH_EVENT);
}
}
示例3: doInternalExecute
@Override
protected Event doInternalExecute(final HttpServletRequest request, final HttpServletResponse response,
final RequestContext context) throws Exception {
boolean needFrontSlo = false;
putLogoutIndex(context, 0);
final List<LogoutRequest> logoutRequests = WebUtils.getLogoutRequests(context);
if (logoutRequests != null) {
for (final LogoutRequest logoutRequest : logoutRequests) {
// if some logout request must still be attempted
if (logoutRequest.getStatus() == LogoutRequestStatus.NOT_ATTEMPTED) {
needFrontSlo = true;
break;
}
}
}
final String service = request.getParameter("service");
if (this.followServiceRedirects && service != null) {
final Service webAppService = new SimpleWebApplicationServiceImpl(service);
final RegisteredService rService = this.servicesManager.findServiceBy(webAppService);
if (rService != null && rService.getAccessStrategy().isServiceAccessAllowed()) {
context.getFlowScope().put("logoutRedirectUrl", service);
}
}
// there are some front services to logout, perform front SLO
if (needFrontSlo) {
return new Event(this, FRONT_EVENT);
} else {
// otherwise, finish the logout process
return new Event(this, FINISH_EVENT);
}
}
示例4: doInternalExecute
@Override
protected Event doInternalExecute(final HttpServletRequest request, final HttpServletResponse response,
final RequestContext context) throws Exception {
final List<LogoutRequest> logoutRequests = WebUtils.getLogoutRequests(context);
final Integer startIndex = getLogoutIndex(context);
if (logoutRequests != null && startIndex != null) {
for (int i = startIndex; i < logoutRequests.size(); i++) {
final LogoutRequest logoutRequest = logoutRequests.get(i);
if (logoutRequest.getStatus() == LogoutRequestStatus.NOT_ATTEMPTED) {
// assume it has been successful
logoutRequest.setStatus(LogoutRequestStatus.SUCCESS);
// save updated index
putLogoutIndex(context, i + 1);
// redirect to application with SAML logout message
final UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(logoutRequest.getService().getId());
builder.queryParam("SAMLRequest",
URLEncoder.encode(logoutManager.createFrontChannelLogoutMessage(logoutRequest), "UTF-8"));
return result(REDIRECT_APP_EVENT, "logoutUrl", builder.build().toUriString());
}
}
}
// no new service with front-channel logout -> finish logout
return new Event(this, FINISH_EVENT);
}
示例5: doInternalExecute
@Override
protected Event doInternalExecute(final HttpServletRequest request, final HttpServletResponse response,
final RequestContext context) throws Exception {
boolean needFrontSlo = false;
putLogoutIndex(context, 0);
final List<LogoutRequest> logoutRequests = WebUtils.getLogoutRequests(context);
if (logoutRequests != null) {
for (LogoutRequest logoutRequest : logoutRequests) {
// if some logout request must still be attempted
if (logoutRequest.getStatus() == LogoutRequestStatus.NOT_ATTEMPTED) {
needFrontSlo = true;
break;
}
}
}
final String service = request.getParameter("service");
if (this.followServiceRedirects && service != null) {
final RegisteredService rService = this.servicesManager.findServiceBy(new SimpleWebApplicationServiceImpl(service));
if (rService != null && rService.isEnabled()) {
context.getFlowScope().put("logoutRedirectUrl", service);
}
}
// there are some front services to logout, perform front SLO
if (needFrontSlo) {
return new Event(this, FRONT_EVENT);
} else {
// otherwise, finish the logout process
return new Event(this, FINISH_EVENT);
}
}