当前位置: 首页>>代码示例>>Java>>正文


Java JavaUtils.isFalseExplicitly方法代码示例

本文整理汇总了Java中org.apache.axis2.util.JavaUtils.isFalseExplicitly方法的典型用法代码示例。如果您正苦于以下问题:Java JavaUtils.isFalseExplicitly方法的具体用法?Java JavaUtils.isFalseExplicitly怎么用?Java JavaUtils.isFalseExplicitly使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.axis2.util.JavaUtils的用法示例。


在下文中一共展示了JavaUtils.isFalseExplicitly方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: authenticateClient

import org.apache.axis2.util.JavaUtils; //导入方法依赖的package包/类
@Override
public boolean authenticateClient(OAuthTokenReqMessageContext tokReqMsgCtx)
        throws IdentityOAuth2Exception {

    OAuth2AccessTokenReqDTO oAuth2AccessTokenReqDTO = tokReqMsgCtx.getOauth2AccessTokenReqDTO();

    //Skipping credential validation for saml2 bearer if not configured as needed
    if (StringUtils.isEmpty(oAuth2AccessTokenReqDTO.getClientSecret()) && org.wso2.carbon.identity.oauth.common
            .GrantType.SAML20_BEARER.toString().equals(oAuth2AccessTokenReqDTO.getGrantType()) && JavaUtils
            .isFalseExplicitly(authConfig)) {
        if (log.isDebugEnabled()) {
            log.debug("Grant type : " + oAuth2AccessTokenReqDTO.getGrantType() + " " +
                    "Strict client validation set to : " + authConfig + " Authenticating without client secret");
        }
        return true;
    }

    if (log.isDebugEnabled()) {
        log.debug("Grant type : " + oAuth2AccessTokenReqDTO.getGrantType() + " " +
                "Strict client validation set to : " + authConfig);
    }
    return false;
}
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:24,代码来源:AbstractClientAuthHandler.java

示例2: initParams

import org.apache.axis2.util.JavaUtils; //导入方法依赖的package包/类
/**
 * Initializes the Axis2 parameters.
 */
protected void initParams() {
    Parameter parameter;
    // do we need to completely disable REST support
    parameter = axisConfiguration.getParameter(Constants.Configuration.DISABLE_REST);
    if (parameter != null) {
        disableREST = !JavaUtils.isFalseExplicitly(parameter.getValue());
    }

    // Should we close the reader(s)
    parameter = axisConfiguration.getParameter("axis2.close.reader");
    if (parameter != null) {
        closeReader = JavaUtils.isTrueExplicitly(parameter.getValue());
    }

}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:19,代码来源:AxisServlet.java

示例3: canAuthenticate

import org.apache.axis2.util.JavaUtils; //导入方法依赖的package包/类
@Override
public boolean canAuthenticate(OAuthTokenReqMessageContext tokReqMsgCtx)
        throws IdentityOAuth2Exception {

    OAuth2AccessTokenReqDTO oAuth2AccessTokenReqDTO = tokReqMsgCtx.getOauth2AccessTokenReqDTO();

    if (StringUtils.isNotEmpty(oAuth2AccessTokenReqDTO.getClientId()) &&
            StringUtils.isNotEmpty(oAuth2AccessTokenReqDTO.getClientSecret())) {
        if (log.isDebugEnabled()) {
            log.debug("Can authenticate with client ID and Secret." +
                    " Client ID: "+ oAuth2AccessTokenReqDTO.getClientId());
        }
        return true;

    } else {
        if (org.wso2.carbon.identity.oauth.common.GrantType.SAML20_BEARER.toString().equals(
                oAuth2AccessTokenReqDTO.getGrantType())) {

            //Getting configured value for client credential validation requirements
            authConfig = properties.getProperty(
                    OAuthConstants.CLIENT_AUTH_CREDENTIAL_VALIDATION);

            if (log.isDebugEnabled()) {
                log.debug("Grant type : " + oAuth2AccessTokenReqDTO.getGrantType());
            }

            //If user has set strict validation to false, can authenticate without credentials
            if (StringUtils.isNotEmpty(authConfig) && JavaUtils.isFalseExplicitly(authConfig)) {
                if (log.isDebugEnabled()) {
                    log.debug("Client auth credential validation set to : " + authConfig + ". " +
                            "can authenticate without client secret");
                }
                return true;
            }
        }
    }
    return false;
}
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:39,代码来源:AbstractClientAuthHandler.java

示例4: canExposeServiceMetadata

import org.apache.axis2.util.JavaUtils; //导入方法依赖的package包/类
/**
 * Checks whether exposing the WSDL & WSDL elements such as schema & policy have been allowed
 *
 * @param service  The AxisService which needs to be verified
 * @throws IOException If exposing WSDL & WSDL elements has been restricted.
 * @return true - if service metadata can be exposed, false - otherwise
 */
private boolean canExposeServiceMetadata(AxisService service) throws IOException {
    Parameter exposeServiceMetadata = service.getParameter("exposeServiceMetadata");
    if (exposeServiceMetadata != null &&
        JavaUtils.isFalseExplicitly(exposeServiceMetadata.getValue())) {
        return false;
    }
    return true;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:16,代码来源:HTTPWorker.java

示例5: canExposeServiceMetadata

import org.apache.axis2.util.JavaUtils; //导入方法依赖的package包/类
/**
 * Checks whether exposing the WSDL & WSDL elements such as schema & policy have been allowed
 *
 * @param service  The AxisService which needs to be verified
 * @throws IOException If exposing WSDL & WSDL elements has been restricted.
 * @return true - if service metadata can be exposed, false - otherwise
 */
private boolean canExposeServiceMetadata(AxisService service) {
    Parameter exposeServiceMetadata = service.getParameter("exposeServiceMetadata");
    if(exposeServiceMetadata != null &&
       JavaUtils.isFalseExplicitly(exposeServiceMetadata.getValue())) {
       return false;
    }
    return true;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:16,代码来源:ListingAgent.java


注:本文中的org.apache.axis2.util.JavaUtils.isFalseExplicitly方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。