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


Java Util.allNotBlank方法代码示例

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


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

示例1: TestModeScimClient

import org.xdi.oxauth.model.util.Util; //导入方法依赖的package包/类
/**
 * Constructs a TestModeScimClient object with the specified parameters and service contract
 * @param serviceClass The service interface the underlying resteasy proxy client will adhere to. This proxy is used
 *                     internally to execute all requests to the service
 * @param serviceUrl The root URL of the SCIM service. Usually in the form {@code https://your.gluu-server.com/identity/restv1}
 * @param OIDCMetadataUrl URL of authorization servers' metadata document. Usually in the form {@code https://your.gluu-server.com/.well-known/openid-configuration}
 * @throws Exception If there was a problem contacting the authorization server to initialize this object
 */
public TestModeScimClient(Class<T> serviceClass, String serviceUrl, String OIDCMetadataUrl) throws Exception {

    super(serviceUrl, serviceClass);

    //Extract token, registration, and authz endpoints from metadata URL
    JsonNode tree=mapper.readTree(new URL(OIDCMetadataUrl));
    this.registrationEndpoint= tree.get("registration_endpoint").asText();
    this.tokenEndpoint=tree.get("token_endpoint").asText();
    //this.authzEndpoint=tree.get("authorization_endpoint").asText();

    if (Util.allNotBlank(registrationEndpoint, tokenEndpoint /*, authzEndpoint*/)) {
        triggerRegistrationIfNeeded();
        updateTokens(GrantType.CLIENT_CREDENTIALS);
    }
    else
        throw new Exception("Couldn't extract endpoints from OIDC metadata URL: " + OIDCMetadataUrl);

}
 
开发者ID:GluuFederation,项目名称:SCIM-Client,代码行数:27,代码来源:TestModeScimClient.java

示例2: request

import org.xdi.oxauth.model.util.Util; //导入方法依赖的package包/类
public static Token request(final String tokenUrl, final String umaClientId, final String umaClientSecret, UmaScopeType scopeType,
                            ClientExecutor clientExecutor, String... scopeArray) throws Exception {

    String scope = scopeType.getValue();
    if (scopeArray != null && scopeArray.length > 0) {
        for (String s : scopeArray) {
            scope = scope + " " + s;
        }
    }

    TokenClient tokenClient = new TokenClient(tokenUrl);
    if (clientExecutor != null) {
        tokenClient.setExecutor(clientExecutor);
    }
    TokenResponse response = tokenClient.execClientCredentialsGrant(scope, umaClientId, umaClientSecret);

    if (response.getStatus() == 200) {
        final String patToken = response.getAccessToken();
        final Integer expiresIn = response.getExpiresIn();
        if (Util.allNotBlank(patToken)) {
            return new Token(null, null, patToken, scopeType.getValue(), expiresIn);
        }
    }

    return null;
}
 
开发者ID:GluuFederation,项目名称:oxAuth,代码行数:27,代码来源:UmaClient.java

示例3: getPermissionFromRPTByResourceId

import org.xdi.oxauth.model.util.Util; //导入方法依赖的package包/类
public UmaPermission getPermissionFromRPTByResourceId(UmaRPT rpt, String resourceId) {
    try {
        if (Util.allNotBlank(resourceId)) {
             for (UmaPermission permission : getRptPermissions(rpt)) {
                if (resourceId.equals(permission.getResourceId())) {
                    return permission;
                }
            }
        }
    } catch (Exception e) {
        log.error(e.getMessage(), e);
    }
    return null;
}
 
开发者ID:GluuFederation,项目名称:oxAuth,代码行数:15,代码来源:UmaRptService.java

示例4: addReqParam

import org.xdi.oxauth.model.util.Util; //导入方法依赖的package包/类
protected void addReqParam(String p_key, String p_value) {
    if (Util.allNotBlank(p_key, p_value)) {
        if (request.getAuthorizationMethod() == AuthorizationMethod.FORM_ENCODED_BODY_PARAMETER) {
            clientRequest.formParameter(p_key, p_value);
        } else {
            clientRequest.queryParameter(p_key, p_value);
        }
    }
}
 
开发者ID:GluuFederation,项目名称:oxAuth,代码行数:10,代码来源:BaseClient.java

示例5: dn

import org.xdi.oxauth.model.util.Util; //导入方法依赖的package包/类
private String dn(String p_id) {
    final String baseDn = getBaseDn();
    final StringBuilder sb = new StringBuilder();
    if (Util.allNotBlank(p_id, getBaseDn())) {
        sb.append("oxAuthSessionId=").append(p_id).append(",").append(baseDn);
    }
    return sb.toString();
}
 
开发者ID:GluuFederation,项目名称:oxAuth,代码行数:9,代码来源:SessionIdService.java

示例6: isInNetwork

import org.xdi.oxauth.model.util.Util; //导入方法依赖的package包/类
public boolean isInNetwork(String cidrNotation) {
    final String ip = getIpAddress();
    if (Util.allNotBlank(ip, cidrNotation)) {
        final SubnetUtils utils = new SubnetUtils(cidrNotation);
        return utils.getInfo().isInRange(ip);
    }
    return false;
}
 
开发者ID:GluuFederation,项目名称:oxAuth,代码行数:9,代码来源:ExternalScriptContext.java


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