本文整理汇总了Java中org.opensaml.saml.saml2.core.Issuer.getValue方法的典型用法代码示例。如果您正苦于以下问题:Java Issuer.getValue方法的具体用法?Java Issuer.getValue怎么用?Java Issuer.getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opensaml.saml.saml2.core.Issuer
的用法示例。
在下文中一共展示了Issuer.getValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: formatAuthnResponse
import org.opensaml.saml.saml2.core.Issuer; //导入方法依赖的package包/类
public String formatAuthnResponse(Response samlResponse, Direction direction, Boolean validSignature) {
Issuer issuer = samlResponse.getIssuer();
String issuerString = issuer != null ? issuer.getValue() : "";
Status status = samlResponse.getStatus();
StatusCode subStatusCode = status.getStatusCode().getStatusCode();
String subStatus = subStatusCode != null ? subStatusCode.getValue() : "";
return String.format(AUTHN_RESPONSE,
samlResponse.getID(),
samlResponse.getInResponseTo(),
direction,
samlResponse.getDestination(),
issuerString,
validSignature,
status.getStatusCode().getValue(),
subStatus,
getStatusDetailValues(status));
}
示例2: formatAuthnRequest
import org.opensaml.saml.saml2.core.Issuer; //导入方法依赖的package包/类
public String formatAuthnRequest(AuthnRequest authnRequest, Direction direction, Boolean validSignature) {
Issuer issuer = authnRequest.getIssuer();
String issuerId = issuer != null ? issuer.getValue() : "";
return String.format(AUTHN_REQUEST,
authnRequest.getID(),
direction,
authnRequest.getDestination(),
issuerId,
validSignature);
}
示例3: validateIssuer
import org.opensaml.saml.saml2.core.Issuer; //导入方法依赖的package包/类
/**
* Validate issuer format and value.
*
* @param issuer the issuer
* @param context the context
*/
protected final void validateIssuer(final Issuer issuer, final SAML2MessageContext context) {
if (issuer.getFormat() != null && !issuer.getFormat().equals(NameIDType.ENTITY)) {
throw new SAMLException("Issuer type is not entity but " + issuer.getFormat());
}
final String entityId = context.getSAMLPeerEntityContext().getEntityId();
if (entityId == null || !entityId.equals(issuer.getValue())) {
throw new SAMLException("Issuer " + issuer.getValue() + " does not match idp entityId " + entityId);
}
}
示例4: validateIssuer
import org.opensaml.saml.saml2.core.Issuer; //导入方法依赖的package包/类
private void validateIssuer(Issuer issuer) {
String issuerId = issuer.getValue();
if (Strings.isNullOrEmpty(issuerId)) {
SamlValidationSpecificationFailure failure = SamlTransformationErrorFactory.missingIssuer();
throw new SamlTransformationErrorException(failure.getErrorMessage(), failure.getLogLevel());
}
}