本文整理了Java中org.opensaml.saml.saml2.core.Attribute.setFriendlyName()
方法的一些代码示例,展示了Attribute.setFriendlyName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Attribute.setFriendlyName()
方法的具体详情如下:
包路径:org.opensaml.saml.saml2.core.Attribute
类名称:Attribute
方法名:setFriendlyName
[英]Sets the friendly name of this attribute.
[中]设置此属性的友好名称。
代码示例来源:origin: org.opensaml/opensaml-saml-impl
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
Attribute attrib = (Attribute) samlObject;
if (attribute.getLocalName().equals(Attribute.NAME_ATTTRIB_NAME)) {
attrib.setName(attribute.getValue());
} else if (attribute.getLocalName().equals(Attribute.NAME_FORMAT_ATTRIB_NAME)) {
attrib.setNameFormat(attribute.getValue());
} else if (attribute.getLocalName().equals(Attribute.FRIENDLY_NAME_ATTRIB_NAME)) {
attrib.setFriendlyName(attribute.getValue());
} else {
processUnknownAttribute(attrib, attribute);
}
}
}
代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-common
/**
* Create an Attribute object.
*
* @param friendlyName of type String
* @param name of type String
* @param nameFormat of type String
* @return an Attribute object
*/
@SuppressWarnings("unchecked")
public static Attribute createAttribute(String friendlyName, String name, String nameFormat) {
if (attributeBuilder == null) {
attributeBuilder = (SAMLObjectBuilder<Attribute>)
builderFactory.getBuilder(Attribute.DEFAULT_ELEMENT_NAME);
}
Attribute attribute = attributeBuilder.buildObject();
attribute.setFriendlyName(friendlyName);
if (nameFormat == null) {
attribute.setNameFormat(SAML2Constants.ATTRNAME_FORMAT_URI);
} else {
attribute.setNameFormat(nameFormat);
}
attribute.setName(name);
return attribute;
}
代码示例来源:origin: spring-projects/spring-security-saml
buildSAMLObject(org.opensaml.saml.saml2.core.Attribute.class);
attribute.setName(attr.getName());
attribute.setFriendlyName(attr.getFriendlyName());
attribute.setNameFormat(attr.getNameFormat().toString());
attr.getValues().stream().forEach(
内容来源于网络,如有侵权,请联系作者删除!