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


Java AuthenticationClient类代码示例

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


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

示例1: authenticate

import org.cagrid.gaards.authentication.client.AuthenticationClient; //导入依赖的package包/类
public SAMLAssertion authenticate(String authenticationServiceURL,
		Credential credential) throws AuthenticationErrorException,
		AuthenticationConfigurationException {

	try {
		AuthenticationClient authenticationClient = new AuthenticationClient(
				authenticationServiceURL);
		SAMLAssertion samlAssertion = authenticationClient
				.authenticate(credential);
		log.debug("authentication successful url"
				+ authenticationServiceURL);
		return samlAssertion;
	} catch (Exception e) {
		handleException(e);
	}
	return null;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:18,代码来源:AuthenticationServiceHelperImpl.java

示例2: authenticate

import org.cagrid.gaards.authentication.client.AuthenticationClient; //导入依赖的package包/类
/*********************
 * This method is used to get the globus credential for given dorian url, authentication service url, user id and string.
 * @param dorianURL
 * @param authenticationServiceURL
 * @param userId
 * @param password
 * @return globus credential of the user.
 * @throws Exception
 */
public static GlobusCredential authenticate(String dorianURL,
		String authenticationServiceURL, String userId, String password)
		throws Exception
{
	// Create credential

	BasicAuthentication auth = new BasicAuthentication();
	auth.setUserId(userId);
	auth.setPassword(password);

	// Authenticate to the IdP (DorianIdP) using credential

	AuthenticationClient authClient = new AuthenticationClient(
			authenticationServiceURL);
	SAMLAssertion saml = authClient.authenticate(auth);

	// Requested Grid Credential lifetime (12 hours)

	CertificateLifetime lifetime = new CertificateLifetime();
	lifetime.setHours(12);

	// Request PKI/Grid Credential
	GridUserClient dorian = new GridUserClient(dorianURL);
	GlobusCredential credential = dorian.requestUserCertificate(saml,
			lifetime);
	return credential;
}
 
开发者ID:NCIP,项目名称:gsid,代码行数:37,代码来源:GridAuthenticationClient.java

示例3: runStep

import org.cagrid.gaards.authentication.client.AuthenticationClient; //导入依赖的package包/类
@Override
public void runStep() throws Throwable {
	BasicAuthentication authCred = new BasicAuthentication();
	authCred.setUserId(this.userId);
	authCred.setPassword(this.password);
	AuthenticationClient client = new AuthenticationClient(this.serviceURL);
	this.saml = client.authenticate(authCred);

	GridUserClient c2 = new GridUserClient(this.serviceURL);
	this.credential = c2.requestUserCertificate(this.saml, new CertificateLifetime(this.hours, 0, 0));
	ProxyUtil.saveProxyAsDefault(this.credential);
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:13,代码来源:DorianAuthenticateStep.java

示例4: runStep

import org.cagrid.gaards.authentication.client.AuthenticationClient; //导入依赖的package包/类
@Override
public void runStep() throws Throwable {
	BasicAuthentication authCred = new BasicAuthentication();
	authCred.setUserId(this.userId);
	authCred.setPassword(this.password);
	AuthenticationClient client = new AuthenticationClient(this.serviceURL);
	this.saml = client.authenticate(authCred);

	GridUserClient c2 = new GridUserClient(this.serviceURL);
	this.credential = c2.requestUserCertificate(this.saml, new CertificateLifetime(
			this.hours, 0, 0));
	ProxyUtil.saveProxyAsDefault(this.credential);
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:14,代码来源:DorianAuthenticateStep.java

示例5: getAuthenticationClient

import org.cagrid.gaards.authentication.client.AuthenticationClient; //导入依赖的package包/类
public AuthenticationClient getAuthenticationClient() throws Exception {
	if (getServiceDescriptor().getServiceURL() != null) {
		AuthenticationClient client = new AuthenticationClient(
				getServiceDescriptor().getServiceURL());
		if (Utils.clean(getServiceDescriptor().getServiceIdentity()) != null) {
			IdentityAuthorization auth = new IdentityAuthorization(
					getServiceDescriptor().getServiceIdentity());
			client.setAuthorization(auth);
		}
		return client;
	}
	return null;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:14,代码来源:AuthenticationServiceHandle.java

示例6: authenticate

import org.cagrid.gaards.authentication.client.AuthenticationClient; //导入依赖的package包/类
public SAMLAssertion authenticate() throws Exception {
    AuthenticationClient client = new AuthenticationClient(getServiceURL());
    return client.authenticate(this.credential);
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:5,代码来源:AuthenticationStep.java

示例7: authenticate

import org.cagrid.gaards.authentication.client.AuthenticationClient; //导入依赖的package包/类
public SAMLAssertion authenticate() throws Exception {
	AuthenticationClient client = new AuthenticationClient(getServiceURL());
	return client.authenticate(this.credential);
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:5,代码来源:AuthenticationStep.java


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