本文整理汇总了Java中org.jasig.cas.support.spnego.util.SpnegoConstants.NTLM属性的典型用法代码示例。如果您正苦于以下问题:Java SpnegoConstants.NTLM属性的具体用法?Java SpnegoConstants.NTLM怎么用?Java SpnegoConstants.NTLM使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.jasig.cas.support.spnego.util.SpnegoConstants
的用法示例。
在下文中一共展示了SpnegoConstants.NTLM属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doExecute
@Override
protected Event doExecute(final RequestContext context) {
final HttpServletRequest request = WebUtils.getHttpServletRequest(context);
final HttpServletResponse response = WebUtils.getHttpServletResponse(context);
final String authorizationHeader = request.getHeader(SpnegoConstants.HEADER_AUTHORIZATION);
final String userAgent = request.getHeader(SpnegoConstants.HEADER_USER_AGENT);
LOGGER.debug("Authorization header [{}], User Agent header [{}]", authorizationHeader, userAgent);
if (!StringUtils.hasText(userAgent) || this.supportedBrowser.isEmpty()) {
LOGGER.debug("User Agent header [{}] is empty, or no browsers are supported", userAgent);
return error();
}
if (!isSupportedBrowser(userAgent)) {
LOGGER.debug("User Agent header [{}] is not supported in the list of supported browsers [{}]",
userAgent, this.supportedBrowser);
return error();
}
if (!StringUtils.hasText(authorizationHeader)
|| !authorizationHeader.startsWith(this.messageBeginPrefix)
|| authorizationHeader.length() <= this.messageBeginPrefix
.length()) {
final String wwwHeader = this.ntlm ? SpnegoConstants.NTLM : SpnegoConstants.NEGOTIATE;
LOGGER.debug("Authorization header not found or does not match the message prefix [{}]. Sending [{}] header [{}]",
this.messageBeginPrefix, SpnegoConstants.HEADER_AUTHENTICATE, wwwHeader);
response.setHeader(SpnegoConstants.HEADER_AUTHENTICATE, wwwHeader);
response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
// The responseComplete flag tells the pausing view-state not to render the response
// because another object has taken care of it. If mixed mode authentication is allowed
// then responseComplete should not be called so that webflow will display the login page.
if (!this.mixedModeAuthentication) {
LOGGER.debug("Mixed-mode authentication is disabled. Executing completion of response");
context.getExternalContext().recordResponseComplete();
}
}
return success();
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:42,代码来源:SpnegoNegociateCredentialsAction.java
示例2: doExecute
@Override
protected Event doExecute(final RequestContext context) {
final HttpServletRequest request = WebUtils.getHttpServletRequest(context);
final HttpServletResponse response = WebUtils.getHttpServletResponse(context);
final String authorizationHeader = request.getHeader(SpnegoConstants.HEADER_AUTHORIZATION);
final String userAgent = request.getHeader(SpnegoConstants.HEADER_USER_AGENT);
LOGGER.debug("Authorization header [{}], User Agent header [{}]", authorizationHeader, userAgent);
if (!StringUtils.hasText(userAgent) || this.supportedBrowser.isEmpty()) {
LOGGER.debug("User Agent header [{}] is empty, or no browsers are supported", userAgent);
return success();
}
if (!isSupportedBrowser(userAgent)) {
LOGGER.debug("User Agent header [{}] is not supported in the list of supported browsers [{}]",
userAgent, this.supportedBrowser);
return success();
}
if (!StringUtils.hasText(authorizationHeader)
|| !authorizationHeader.startsWith(this.messageBeginPrefix)
|| authorizationHeader.length() <= this.messageBeginPrefix
.length()) {
final String wwwHeader = this.ntlm ? SpnegoConstants.NTLM : SpnegoConstants.NEGOTIATE;
LOGGER.debug("Authorization header not found or does not match the message prefix [{}]. Sending [{}] header [{}]",
this.messageBeginPrefix, SpnegoConstants.HEADER_AUTHENTICATE, wwwHeader);
response.setHeader(SpnegoConstants.HEADER_AUTHENTICATE, wwwHeader);
response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
// The responseComplete flag tells the pausing view-state not to render the response
// because another object has taken care of it. If mixed mode authentication is allowed
// then responseComplete should not be called so that webflow will display the login page.
if (!this.mixedModeAuthentication) {
LOGGER.debug("Mixed-mode authentication is disabled. Executing completion of response");
context.getExternalContext().recordResponseComplete();
}
}
return success();
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:42,代码来源:SpnegoNegociateCredentialsAction.java
示例3: constructMessagePrefix
protected String constructMessagePrefix() {
return (this.ntlm ? SpnegoConstants.NTLM : SpnegoConstants.NEGOTIATE)
+ " ";
}
示例4: constructMessagePrefix
/**
* Construct message prefix.
*
* @return if {@link #ntlm} is enabled, {@link SpnegoConstants#NTLM}, otherwise
* {@link SpnegoConstants#NEGOTIATE}. An extra space is appended to the end.
*/
protected String constructMessagePrefix() {
return (this.ntlm ? SpnegoConstants.NTLM : SpnegoConstants.NEGOTIATE)
+ ' ';
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:10,代码来源:SpnegoNegociateCredentialsAction.java
示例5: constructMessagePrefix
/**
* Construct message prefix.
*
* @return the string
*/
protected String constructMessagePrefix() {
return (this.ntlm ? SpnegoConstants.NTLM : SpnegoConstants.NEGOTIATE)
+ ' ';
}