• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java EncryptionException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.blackducksoftware.integration.exception.EncryptionException的典型用法代码示例。如果您正苦于以下问题:Java EncryptionException类的具体用法?Java EncryptionException怎么用?Java EncryptionException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



EncryptionException类属于com.blackducksoftware.integration.exception包,在下文中一共展示了EncryptionException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createFromProperties

import com.blackducksoftware.integration.exception.EncryptionException; //导入依赖的package包/类
private ExtensionOAuthConfiguration createFromProperties(final Properties properties) throws IllegalArgumentException, EncryptionException {
    final String clientId = getPropertyValue(properties.getProperty(OAUTH_PROPERTY_CLIENT_ID));
    final String userRefreshToken = getPropertyValue(properties.getProperty(OAUTH_PROPERTY_USER_REFRESH_TOKEN));
    final String callbackUrl = getPropertyValue(properties.getProperty(OAUTH_PROPERTY_CALLBACK_URL));
    final String hubUri = getPropertyValue(properties.getProperty(OAUTH_PROPERTY_HUB_URI));
    final String extensionUri = getPropertyValue(properties.getProperty(OAUTH_PROPERTY_EXTENSION_URI));
    final String authorizeUri = getPropertyValue(properties.getProperty(OAUTH_PROPERTY_AUTHORIZE_URI));
    final String tokenUri = getPropertyValue(properties.getProperty(OAUTH_PROPERTY_TOKEN_URI));
    final ExtensionOAuthConfiguration config = new ExtensionOAuthConfiguration();
    config.clientId = clientId;
    config.callbackUrl = callbackUrl;
    config.refreshToken = userRefreshToken;
    config.setAddresses(hubUri, extensionUri, authorizeUri, tokenUri);

    return config;
}
 
开发者ID:blackducksoftware,项目名称:hub-email-extension,代码行数:17,代码来源:OAuthConfigManager.java


示例2: checkInput

import com.blackducksoftware.integration.exception.EncryptionException; //导入依赖的package包/类
public void checkInput(final HttpServletRequest request, final ActionErrors errors) throws IllegalArgumentException, EncryptionException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
    final HubServerConfigBuilder builder = getHubServerConfigBuilderFromRequest(request);

    final AbstractValidator validator = builder.createValidator();

    final ValidationResults results = validator.assertValid();
    if (results.isSuccess()) {
        final HubServerConfig config = builder.buildObject();
        configPersistenceManager.setHubServerConfig(config);
        configPersistenceManager.setHubWorkspaceCheck(Boolean.valueOf(request.getParameter("hubWorkspaceCheck")));
    } else {
        checkForErrors(HubServerConfigFieldEnum.HUBURL, "errorUrl", results, errors);
        checkForErrors(HubServerConfigFieldEnum.HUBTIMEOUT, "errorTimeout", results, errors);

        checkForErrors(HubCredentialsFieldEnum.USERNAME, "errorUserName", results, errors);
        checkForErrors(HubCredentialsFieldEnum.PASSWORD, "errorPassword", results, errors);

        checkForErrors(HubProxyInfoFieldEnum.PROXYHOST, "errorHubProxyServer", results, errors);
        checkForErrors(HubProxyInfoFieldEnum.PROXYPORT, "errorHubProxyPort", results, errors);
        checkForErrors(HubProxyInfoFieldEnum.NOPROXYHOSTS, "errorHubNoProxyHost", results, errors);
        checkForErrors(HubProxyInfoFieldEnum.PROXYUSERNAME, "errorHubProxyUser", results, errors);
        checkForErrors(HubProxyInfoFieldEnum.PROXYPASSWORD, "errorHubProxyPass", results, errors);
    }
}
 
开发者ID:blackducksoftware,项目名称:hub-teamcity,代码行数:25,代码来源:HubGlobalServerConfigController.java


示例3: getHubServerConfigBuilderFromRequest

import com.blackducksoftware.integration.exception.EncryptionException; //导入依赖的package包/类
private HubServerConfigBuilder getHubServerConfigBuilderFromRequest(final HttpServletRequest request) throws IllegalArgumentException, EncryptionException {
    final HubServerConfigBuilder serverConfigBuilder = new HubServerConfigBuilder();

    serverConfigBuilder.setHubUrl(request.getParameter("hubUrl"));
    serverConfigBuilder.setTimeout(request.getParameter("hubTimeout"));
    serverConfigBuilder.setUsername(request.getParameter("hubUser"));
    String hubPass = getDecryptedWebPassword(request.getParameter("encryptedHubPass"));
    if (isPasswordAstericks(hubPass) && configPersistenceManager.getHubServerConfig() != null && configPersistenceManager.getHubServerConfig().getGlobalCredentials() != null) {
        hubPass = configPersistenceManager.getHubServerConfig().getGlobalCredentials().getDecryptedPassword();
    }
    serverConfigBuilder.setPassword(hubPass);
    serverConfigBuilder.setAutoImportHttpsCertificates(Boolean.valueOf(request.getParameter("autoImportHttpsCertificates")));
    serverConfigBuilder.setProxyHost(request.getParameter("hubProxyServer"));
    serverConfigBuilder.setProxyPort(request.getParameter("hubProxyPort"));
    serverConfigBuilder.setIgnoredProxyHosts(request.getParameter("hubNoProxyHost"));
    serverConfigBuilder.setProxyUsername(request.getParameter("hubProxyUser"));
    String proxyPass = getDecryptedWebPassword(request.getParameter("encryptedHubProxyPass"));
    if (isPasswordAstericks(proxyPass) && configPersistenceManager.getHubServerConfig() != null && configPersistenceManager.getHubServerConfig().getProxyInfo() != null) {
        proxyPass = configPersistenceManager.getHubServerConfig().getProxyInfo().getDecryptedPassword();
    }
    serverConfigBuilder.setProxyPassword(proxyPass);

    return serverConfigBuilder;
}
 
开发者ID:blackducksoftware,项目名称:hub-teamcity,代码行数:25,代码来源:HubGlobalServerConfigController.java


示例4: getCredentialsFromRequest

import com.blackducksoftware.integration.exception.EncryptionException; //导入依赖的package包/类
public HubCredentials getCredentialsFromRequest(final HttpServletRequest request, final String usernameKey) throws IllegalArgumentException, EncryptionException {
    final String username = request.getParameter(usernameKey);
    String password = "";
    password = request.getParameter("encryptedHubPass");

    HubCredentials hubCredentials = null;
    final String decryptedPassword = getDecryptedWebPassword(password);
    if (isPasswordAstericks(decryptedPassword) && configPersistenceManager.getHubServerConfig() != null && configPersistenceManager.getHubServerConfig().getGlobalCredentials() != null) {
        final String savedPassword = configPersistenceManager.getHubServerConfig().getGlobalCredentials().getDecryptedPassword();
        hubCredentials = new HubCredentials(username, savedPassword);
    } else {
        if (StringUtils.isNotBlank(decryptedPassword)) {
            // Do not change the saved password unless the User has provided a new one
            final String decryptedWebPassword = getDecryptedWebPassword(password);
            if (StringUtils.isNotBlank(decryptedWebPassword)) {
                hubCredentials = new HubCredentials(username, decryptedWebPassword);
            }
        }
    }

    return hubCredentials;
}
 
开发者ID:blackducksoftware,项目名称:hub-teamcity,代码行数:23,代码来源:HubGlobalServerConfigController.java


示例5: testIsHubCredentialConfiguredValidCredentials

import com.blackducksoftware.integration.exception.EncryptionException; //导入依赖的package包/类
@Test
public void testIsHubCredentialConfiguredValidCredentials() throws EncryptionException {
    final HubParameterValidator validator = new HubParameterValidator(buildLogger);
    final HubCredentials credential = new HubCredentials("user", "password");
    assertTrue(validator.isHubCredentialConfigured(credential));
    assertTrue(testLogger.getErrorMessages().size() == 0);
}
 
开发者ID:blackducksoftware,项目名称:hub-teamcity,代码行数:8,代码来源:HubParameterValidatorTest.java


示例6: getDecryptedWebPassword

import com.blackducksoftware.integration.exception.EncryptionException; //导入依赖的package包/类
private String getDecryptedWebPassword(final String webEncryptedPass) throws IllegalArgumentException, EncryptionException {
    if (StringUtils.isNotBlank(webEncryptedPass)) {
        final String webDecryptedPass = RSACipher.decryptWebRequestData(webEncryptedPass);

        if (StringUtils.isNotBlank(webDecryptedPass)) {
            return webDecryptedPass;
        }
    }
    return "";
}
 
开发者ID:blackducksoftware,项目名称:hub-teamcity,代码行数:11,代码来源:HubGlobalServerConfigController.java


示例7: createHubServicesFactory

import com.blackducksoftware.integration.exception.EncryptionException; //导入依赖的package包/类
private HubServicesFactory createHubServicesFactory(final HubServerConfig hubServerConfig) throws EncryptionException {
	final RestConnection restConnection = new CredentialsRestConnection(logger, hubServerConfig.getHubUrl(),
			hubServerConfig.getGlobalCredentials().getUsername(), hubServerConfig.getGlobalCredentials().getDecryptedPassword(),
			hubServerConfig.getTimeout());
	final HubServicesFactory hubServicesFactory = new HubServicesFactory(restConnection);
	return hubServicesFactory;
}
 
开发者ID:blackducksoftware,项目名称:hub-jira,代码行数:8,代码来源:HubJiraTask.java


示例8: getPropertyValue

import com.blackducksoftware.integration.exception.EncryptionException; //导入依赖的package包/类
private String getPropertyValue(final String propertyValue) throws IllegalArgumentException, EncryptionException {
    final Decoder decoder = Base64.getUrlDecoder();
    final String value = new String(decoder.decode(propertyValue));
    return value;
}
 
开发者ID:blackducksoftware,项目名称:hub-email-extension,代码行数:6,代码来源:OAuthConfigManager.java


示例9: encodePropertyValue

import com.blackducksoftware.integration.exception.EncryptionException; //导入依赖的package包/类
private String encodePropertyValue(final String value) throws IllegalArgumentException, EncryptionException {
    // simply obfuscate the values from clear text.
    final Encoder encoder = Base64.getUrlEncoder();
    final String encoded = encoder.encodeToString(value.getBytes());
    return encoded;
}
 
开发者ID:blackducksoftware,项目名称:hub-email-extension,代码行数:7,代码来源:OAuthConfigManager.java


示例10: getRestConnection

import com.blackducksoftware.integration.exception.EncryptionException; //导入依赖的package包/类
public RestConnection getRestConnection(final IntLogger logger, final HubServerConfig hubServerConfig) throws EncryptionException {
    return hubServerConfig.createCredentialsRestConnection(logger);
}
 
开发者ID:blackducksoftware,项目名称:hub-teamcity,代码行数:4,代码来源:HubBuildProcess.java


示例11: getRestConnection

import com.blackducksoftware.integration.exception.EncryptionException; //导入依赖的package包/类
private RestConnection getRestConnection(final HubServerConfig hubServerConfig) throws EncryptionException {
    final Slf4jIntLogger intLogger = new Slf4jIntLogger(logger);
    return hubServerConfig.createCredentialsRestConnection(intLogger);
}
 
开发者ID:blackducksoftware,项目名称:hub-maven-plugin,代码行数:5,代码来源:BuildBOMGoal.java


示例12: createHubServicesFactory

import com.blackducksoftware.integration.exception.EncryptionException; //导入依赖的package包/类
public HubServicesFactory createHubServicesFactory(final HubServerConfig config) throws EncryptionException {
    final RestConnection restConnection = new CredentialsRestConnection(logger, config.getHubUrl(), config.getGlobalCredentials().getUsername(), config.getGlobalCredentials().getDecryptedPassword(), config.getTimeout());
    return new HubServicesFactory(restConnection);
}
 
开发者ID:blackducksoftware,项目名称:hub-jira,代码行数:5,代码来源:IssueTrackerTask.java


示例13: createHubServicesFactory

import com.blackducksoftware.integration.exception.EncryptionException; //导入依赖的package包/类
@Override
public HubServicesFactory createHubServicesFactory(final HubServerConfig config) throws EncryptionException {
    return hubServicesFactory;
}
 
开发者ID:blackducksoftware,项目名称:hub-jira,代码行数:5,代码来源:IssueTrackerTaskWithMocks.java


示例14: getVulnerabililtyBomComponentUrl

import com.blackducksoftware.integration.exception.EncryptionException; //导入依赖的package包/类
/**
 * Get the Hub Vulnerability BOM component Url
 *
 * @param projectVersionItem
 * @return
 * @throws HubIntegrationException
 * @throws IllegalArgumentException
 * @throws EncryptionException
 */
private String getVulnerabililtyBomComponentUrl(final ProjectVersionView projectVersionItem)
        throws HubIntegrationException, IllegalArgumentException, EncryptionException {
    final MetaService metaService = hubServicesFactory.createMetaService();
    return metaService.getFirstLink(projectVersionItem, MetaService.VULNERABLE_COMPONENTS_LINK);
}
 
开发者ID:blackducksoftware,项目名称:hub-fortify-ssc-integration-service,代码行数:15,代码来源:HubServices.java


示例15: getProjectVersionRiskProfileUrl

import com.blackducksoftware.integration.exception.EncryptionException; //导入依赖的package包/类
/**
 * Get the Hub Project version risk-profile url
 *
 * @param projectVersionItem
 * @return
 * @throws HubIntegrationException
 * @throws IllegalArgumentException
 * @throws EncryptionException
 */
private String getProjectVersionRiskProfileUrl(final ProjectVersionView projectVersionItem)
        throws HubIntegrationException, IllegalArgumentException, EncryptionException {
    final MetaService metaService = hubServicesFactory.createMetaService();
    return metaService.getFirstLink(projectVersionItem, MetaService.RISK_PROFILE_LINK);
}
 
开发者ID:blackducksoftware,项目名称:hub-fortify-ssc-integration-service,代码行数:15,代码来源:HubServices.java



注:本文中的com.blackducksoftware.integration.exception.EncryptionException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java StrongEmphSuperNode类代码示例发布时间:2022-05-22
下一篇:
Java RecognitionRequest类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap