本文整理汇总了Java中org.opensaml.saml2.core.AuthenticatingAuthority类的典型用法代码示例。如果您正苦于以下问题:Java AuthenticatingAuthority类的具体用法?Java AuthenticatingAuthority怎么用?Java AuthenticatingAuthority使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AuthenticatingAuthority类属于org.opensaml.saml2.core包,在下文中一共展示了AuthenticatingAuthority类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testChildElementsMarshall
import org.opensaml.saml2.core.AuthenticatingAuthority; //导入依赖的package包/类
/** {@inheritDoc} */
public void testChildElementsMarshall() {
QName qname = new QName(SAMLConstants.SAML20_NS, AuthnContext.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20_PREFIX);
AuthnContext authnContext = (AuthnContext) buildXMLObject(qname);
QName authnContextClassRefQName = new QName(SAMLConstants.SAML20_NS, AuthnContextClassRef.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20_PREFIX);
authnContext.setAuthnContextClassRef((AuthnContextClassRef) buildXMLObject(authnContextClassRefQName));
QName authnContextDeclQName = new QName(SAMLConstants.SAML20_NS, AuthnContextDecl.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20_PREFIX);
authnContext.setAuthnContextDecl((AuthnContextDecl) buildXMLObject(authnContextDeclQName));
QName authnContextDeclRefQName = new QName(SAMLConstants.SAML20_NS, AuthnContextDeclRef.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20_PREFIX);
authnContext.setAuthnContextDeclRef((AuthnContextDeclRef) buildXMLObject(authnContextDeclRefQName));
QName authenticatingAuthorityQName = new QName(SAMLConstants.SAML20_NS, AuthenticatingAuthority.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20_PREFIX);
for (int i = 0; i < expectedAuthenticatingAuthorityCount; i++) {
authnContext.getAuthenticatingAuthorities().add((AuthenticatingAuthority) buildXMLObject(authenticatingAuthorityQName));
}
assertEquals(expectedChildElementsDOM, authnContext);
}
示例2: processChildElement
import org.opensaml.saml2.core.AuthenticatingAuthority; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException {
AuthnContext authnContext = (AuthnContext) parentObject;
if (childObject instanceof AuthnContextClassRef) {
authnContext.setAuthnContextClassRef((AuthnContextClassRef) childObject);
} else if (childObject instanceof AuthnContextDecl) {
authnContext.setAuthnContextDecl((AuthnContextDecl) childObject);
} else if (childObject instanceof AuthnContextDeclRef) {
authnContext.setAuthnContextDeclRef((AuthnContextDeclRef) childObject);
} else if (childObject instanceof AuthenticatingAuthority) {
authnContext.getAuthenticatingAuthorities().add((AuthenticatingAuthority) childObject);
} else {
super.processChildElement(parentObject, childObject);
}
}
示例3: testURIFailure
import org.opensaml.saml2.core.AuthenticatingAuthority; //导入依赖的package包/类
/**
* Tests absent URI failure.
*
* @throws ValidationException
*/
public void testURIFailure() throws ValidationException {
AuthenticatingAuthority authenticatingAuthority = (AuthenticatingAuthority) target;
authenticatingAuthority.setURI(null);
assertValidationFail("URI was null, should raise a Validation Exception");
authenticatingAuthority.setURI("");
assertValidationFail("URI was empty string, should raise a Validation Exception");
authenticatingAuthority.setURI(" ");
assertValidationFail("URI was white space, should raise a Validation Exception");
}
示例4: testSingleElementUnmarshall
import org.opensaml.saml2.core.AuthenticatingAuthority; //导入依赖的package包/类
/** {@inheritDoc} */
public void testSingleElementUnmarshall() {
AuthenticatingAuthority authenticatingAuthority = (AuthenticatingAuthority) unmarshallElement(singleElementFile);
String assertionURI = authenticatingAuthority.getURI();
assertEquals("URI was " + assertionURI + ", expected " + expectedURI, expectedURI, assertionURI);
}
示例5: testSingleElementMarshall
import org.opensaml.saml2.core.AuthenticatingAuthority; //导入依赖的package包/类
/** {@inheritDoc} */
public void testSingleElementMarshall() {
QName qname = new QName(SAMLConstants.SAML20_NS, AuthenticatingAuthority.DEFAULT_ELEMENT_LOCAL_NAME,
SAMLConstants.SAML20_PREFIX);
AuthenticatingAuthority authenticatingAuthority = (AuthenticatingAuthority) buildXMLObject(qname);
authenticatingAuthority.setURI(expectedURI);
assertEquals(expectedDOM, authenticatingAuthority);
}
示例6: validate
import org.opensaml.saml2.core.AuthenticatingAuthority; //导入依赖的package包/类
/** {@inheritDoc} */
public void validate(AuthenticatingAuthority authenAuthority) throws ValidationException {
validateURI(authenAuthority);
}
示例7: buildObject
import org.opensaml.saml2.core.AuthenticatingAuthority; //导入依赖的package包/类
/** {@inheritDoc} */
public AuthenticatingAuthority buildObject() {
return buildObject(SAMLConstants.SAML20_NS, AuthenticatingAuthority.DEFAULT_ELEMENT_LOCAL_NAME,
SAMLConstants.SAML20_PREFIX);
}
示例8: processElementContent
import org.opensaml.saml2.core.AuthenticatingAuthority; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processElementContent(XMLObject samlObject, String elementContent) {
AuthenticatingAuthority authenticatingAuthority = (AuthenticatingAuthority) samlObject;
authenticatingAuthority.setURI(elementContent);
}
示例9: marshallElementContent
import org.opensaml.saml2.core.AuthenticatingAuthority; //导入依赖的package包/类
/** {@inheritDoc} */
protected void marshallElementContent(XMLObject samlObject, Element domElement) throws MarshallingException {
AuthenticatingAuthority authenticatingAuthority = (AuthenticatingAuthority) samlObject;
XMLHelper.appendTextContent(domElement, authenticatingAuthority.getURI());
}
示例10: getAuthenticatingAuthorities
import org.opensaml.saml2.core.AuthenticatingAuthority; //导入依赖的package包/类
/** {@inheritDoc} */
public List<AuthenticatingAuthority> getAuthenticatingAuthorities() {
return authenticatingAuthority;
}
示例11: AuthenticatingAuthorityUnmarshaller
import org.opensaml.saml2.core.AuthenticatingAuthority; //导入依赖的package包/类
/** Constructor. */
public AuthenticatingAuthorityUnmarshaller() {
super(SAMLConstants.SAML20_NS, AuthenticatingAuthority.DEFAULT_ELEMENT_LOCAL_NAME);
}
示例12: AuthenticatingAuthorityMarshaller
import org.opensaml.saml2.core.AuthenticatingAuthority; //导入依赖的package包/类
/** Constructor. */
public AuthenticatingAuthorityMarshaller() {
super(SAMLConstants.SAML20_NS, AuthenticatingAuthority.DEFAULT_ELEMENT_LOCAL_NAME);
}
示例13: AuthenticatingAuthoritySchemaTest
import org.opensaml.saml2.core.AuthenticatingAuthority; //导入依赖的package包/类
/** Constructor */
public AuthenticatingAuthoritySchemaTest() {
targetQName = new QName(SAMLConstants.SAML20_NS, AuthenticatingAuthority.DEFAULT_ELEMENT_LOCAL_NAME,
SAMLConstants.SAML20_PREFIX);
validator = new AuthenticatingAuthoritySchemaValidator();
}
示例14: populateRequiredData
import org.opensaml.saml2.core.AuthenticatingAuthority; //导入依赖的package包/类
protected void populateRequiredData() {
super.populateRequiredData();
AuthenticatingAuthority authenticatingAuthority = (AuthenticatingAuthority) target;
authenticatingAuthority.setURI("uri");
}
示例15: validateURI
import org.opensaml.saml2.core.AuthenticatingAuthority; //导入依赖的package包/类
/**
* Checks that the URI is present.
*
* @param authenAuthority
* @throws ValidationException
*/
protected void validateURI(AuthenticatingAuthority authenAuthority) throws ValidationException {
if (DatatypeHelper.isEmpty(authenAuthority.getURI())) {
throw new ValidationException("URI required");
}
}