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


Java SingleLogoutService类代码示例

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


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

示例1: getSingleLogoutServiceResponseLocation

import org.opensaml.saml2.metadata.SingleLogoutService; //导入依赖的package包/类
/**
 * 
 * @return The response location (URL) of {@link SingleSignOnService} at the Login Site
 */
public String getSingleLogoutServiceResponseLocation() {
	if (idpSSODescriptor.getSingleLogoutServices().size() > 0) {
	    List<SingleLogoutService> singleLogoutServices = idpSSODescriptor.getSingleLogoutServices();

              // Prefer POST binding - due to browser redirect limitations.
	    SingleLogoutService singleLogoutService = idpSSODescriptor.getSingleLogoutServices().get(0);
	    for (SingleLogoutService sls : singleLogoutServices) {
	        if(sls.getBinding().equals(SAMLConstants.SAML2_POST_BINDING_URI)) {
	            singleLogoutService = sls;
	            break;
	        }
              }

	    String location = singleLogoutService.getResponseLocation();
		if (location == null) {
			location = singleLogoutService.getLocation();
		}
		return location;
	}
	return null;
}
 
开发者ID:amagdenko,项目名称:oiosaml.java,代码行数:26,代码来源:IdpMetadata.java

示例2: processChildElement

import org.opensaml.saml2.metadata.SingleLogoutService; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentElement, XMLObject childElement) throws UnmarshallingException {
    SSODescriptor descriptor = (SSODescriptor) parentElement;
    if (childElement instanceof ArtifactResolutionService) {
        descriptor.getArtifactResolutionServices().add((ArtifactResolutionService) childElement);
    } else if (childElement instanceof SingleLogoutService) {
        descriptor.getSingleLogoutServices().add((SingleLogoutService) childElement);
    } else if (childElement instanceof ManageNameIDService) {
        descriptor.getManageNameIDServices().add((ManageNameIDService) childElement);
    } else if (childElement instanceof NameIDFormat) {
        descriptor.getNameIDFormats().add((NameIDFormat) childElement);
    } else {
        super.processChildElement(parentElement, childElement);
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:SSODescriptorUnmarshaller.java

示例3: SSODescriptorImpl

import org.opensaml.saml2.metadata.SingleLogoutService; //导入依赖的package包/类
/**
 * Constructor.
 * 
 * @param namespaceURI the namespace the element is in
 * @param elementLocalName the local name of the XML element this Object represents
 * @param namespacePrefix the prefix for the given namespace
 */
protected SSODescriptorImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
    super(namespaceURI, elementLocalName, namespacePrefix);
    artifactResolutionServices = new XMLObjectChildrenList<ArtifactResolutionService>(this);
    singleLogoutServices = new XMLObjectChildrenList<SingleLogoutService>(this);
    manageNameIDServices = new XMLObjectChildrenList<ManageNameIDService>(this);
    nameIDFormats = new XMLObjectChildrenList<NameIDFormat>(this);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:15,代码来源:SSODescriptorImpl.java

示例4: getEndpoints

import org.opensaml.saml2.metadata.SingleLogoutService; //导入依赖的package包/类
/** {@inheritDoc} */
public List<Endpoint> getEndpoints(QName type) {
    if(type.equals(ArtifactResolutionService.DEFAULT_ELEMENT_NAME)){
        return Collections.unmodifiableList(new ArrayList<Endpoint>(artifactResolutionServices));
    }else if(type.equals(SingleLogoutService.DEFAULT_ELEMENT_NAME)){
        return Collections.unmodifiableList(new ArrayList<Endpoint>(singleLogoutServices));
    }else if(type.equals(ManageNameIDService.DEFAULT_ELEMENT_NAME)){
        return Collections.unmodifiableList(new ArrayList<Endpoint>(manageNameIDServices));
    }
    
    return null;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:13,代码来源:SSODescriptorImpl.java

示例5: getSingleLogoutService

import org.opensaml.saml2.metadata.SingleLogoutService; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private SingleLogoutService getSingleLogoutService(final SAMLConfig configuration, final String binding) {
	SAMLObjectBuilder<SingleLogoutService> builder = (SAMLObjectBuilder<SingleLogoutService>) builderFactory.getBuilder(SingleLogoutService.DEFAULT_ELEMENT_NAME);
	SingleLogoutService service = builder.buildObject();
	service.setBinding(binding);
	service.setLocation(configuration.getLogoutUrl());

	return service;
}
 
开发者ID:italia,项目名称:spid-spring,代码行数:10,代码来源:IdpMetadataGenerator.java

示例6: getSingleLogoutServiceLocation

import org.opensaml.saml2.metadata.SingleLogoutService; //导入依赖的package包/类
/**
 * 
 * @return The location (URL) of {@link SingleSignOnService} at the Login Site
 */
public String getSingleLogoutServiceLocation() {
	String url = null;
	if (idpSSODescriptor.getSingleLogoutServices().size() > 0) {
		SingleLogoutService singleLogoutService = idpSSODescriptor.getSingleLogoutServices().get(0);
		url = singleLogoutService.getLocation();
	}
	return url;
}
 
开发者ID:amagdenko,项目名称:oiosaml.java,代码行数:13,代码来源:IdpMetadata.java

示例7: getSingleLogoutServiceHTTPRedirectLocation

import org.opensaml.saml2.metadata.SingleLogoutService; //导入依赖的package包/类
/**
 * 
 * @return The location (URL) of {@link SingleSignOnService} at the service
 *         provider for HTTP-Redirect
 */
public String getSingleLogoutServiceHTTPRedirectLocation() {
	for (SingleLogoutService singleLogoutService : spSSODescriptor.getSingleLogoutServices()) {
		if (SAMLConstants.SAML2_REDIRECT_BINDING_URI.equals(singleLogoutService.getBinding())) {
			return singleLogoutService.getLocation();
		}
	}
	return null;
}
 
开发者ID:amagdenko,项目名称:oiosaml.java,代码行数:14,代码来源:SPMetadata.java

示例8: getSingleLogoutServiceHTTPRedirectResponseLocation

import org.opensaml.saml2.metadata.SingleLogoutService; //导入依赖的package包/类
/**
 * 
 * @return The response location (URL) of {@link SingleLogoutService} at the
 *         service provider for HTTP-Redirect
 */
public String getSingleLogoutServiceHTTPRedirectResponseLocation() {
	for (SingleLogoutService singleLogoutService : spSSODescriptor.getSingleLogoutServices()) {
		if (SAMLConstants.SAML2_REDIRECT_BINDING_URI.equals(singleLogoutService.getBinding())) {
			return singleLogoutService.getResponseLocation();
		}
	}
	return null;
}
 
开发者ID:amagdenko,项目名称:oiosaml.java,代码行数:14,代码来源:SPMetadata.java

示例9: getSingleLogoutServiceSOAPLocation

import org.opensaml.saml2.metadata.SingleLogoutService; //导入依赖的package包/类
/**
 * 
 * @return The location (URL) of {@link SingleLogoutService} at the service
 *         provider for SOAP
 */
public String getSingleLogoutServiceSOAPLocation() {
	for (SingleLogoutService singleLogoutService : spSSODescriptor.getSingleLogoutServices()) {
		if (SAMLConstants.SAML2_SOAP11_BINDING_URI.equals(singleLogoutService.getBinding())) {
			return singleLogoutService.getLocation();
		}
	}
	return null;
}
 
开发者ID:amagdenko,项目名称:oiosaml.java,代码行数:14,代码来源:SPMetadata.java

示例10: getSingleLogoutServiceHTTPPostLocation

import org.opensaml.saml2.metadata.SingleLogoutService; //导入依赖的package包/类
/**
 * 
 * @return The location (URL) of {@link SingleLogoutService} at the service
 *         provider for POST
 */
public String getSingleLogoutServiceHTTPPostLocation() {
	for (SingleLogoutService singleLogoutService : spSSODescriptor.getSingleLogoutServices()) {
		if (SAMLConstants.SAML2_POST_BINDING_URI.equals(singleLogoutService.getBinding())) {
			return singleLogoutService.getLocation();
		}
	}
	return null;
}
 
开发者ID:amagdenko,项目名称:oiosaml.java,代码行数:14,代码来源:SPMetadata.java

示例11: getSingleLogoutServiceHTTPPostResponseLocation

import org.opensaml.saml2.metadata.SingleLogoutService; //导入依赖的package包/类
/**
 * 
 * @return The response location (URL) of {@link SingleLogoutService} at the
 *         service provider for POST
 */
public String getSingleLogoutServiceHTTPPostResponseLocation() {
	for (SingleLogoutService singleLogoutService : spSSODescriptor.getSingleLogoutServices()) {
		if (SAMLConstants.SAML2_POST_BINDING_URI.equals(singleLogoutService.getBinding())) {
			return singleLogoutService.getResponseLocation();
		}
	}
	return null;
}
 
开发者ID:amagdenko,项目名称:oiosaml.java,代码行数:14,代码来源:SPMetadata.java

示例12: createSingleLogoutService

import org.opensaml.saml2.metadata.SingleLogoutService; //导入依赖的package包/类
public static SingleLogoutService createSingleLogoutService(String location, String responseLocation, String binding) {
	SingleLogoutService sls = buildXMLObject(SingleLogoutService.class);
	sls.setBinding(binding);
	sls.setLocation(location);
	sls.setResponseLocation(responseLocation);
	return sls;
}
 
开发者ID:amagdenko,项目名称:oiosaml.java,代码行数:8,代码来源:SAMLUtil.java

示例13: testSingleElementUnmarshall

import org.opensaml.saml2.metadata.SingleLogoutService; //导入依赖的package包/类
/** {@inheritDoc} */
public void testSingleElementUnmarshall() {
    SingleLogoutService service = (SingleLogoutService) unmarshallElement(singleElementFile);
    
    assertEquals("Binding URI was not expected value", expectedBinding, service.getBinding());
    assertEquals("Location was not expected value", expectedLocation, service.getLocation());
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:8,代码来源:SingleLogoutServiceTest.java

示例14: testSingleElementOptionalAttributesUnmarshall

import org.opensaml.saml2.metadata.SingleLogoutService; //导入依赖的package包/类
/** {@inheritDoc} */
public void testSingleElementOptionalAttributesUnmarshall() {
    SingleLogoutService service = (SingleLogoutService) unmarshallElement(singleElementOptionalAttributesFile);
    
    assertEquals("Binding URI was not expected value", expectedBinding, service.getBinding());
    assertEquals("Location was not expected value", expectedLocation, service.getLocation());
    assertEquals("ResponseLocation was not expected value", expectedResponseLocation, service.getResponseLocation());;
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:9,代码来源:SingleLogoutServiceTest.java

示例15: testSingleElementMarshall

import org.opensaml.saml2.metadata.SingleLogoutService; //导入依赖的package包/类
/** {@inheritDoc} */
public void testSingleElementMarshall() {
    QName qname = new QName(SAMLConstants.SAML20MD_NS, SingleLogoutService.DEFAULT_ELEMENT_LOCAL_NAME);
    SingleLogoutService service = (SingleLogoutService) buildXMLObject(qname);
    
    service.setBinding(expectedBinding);
    service.setLocation(expectedLocation);

    assertEquals(expectedDOM, service);
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:11,代码来源:SingleLogoutServiceTest.java


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