本文整理了Java中org.opensaml.saml2.core.Assertion.setIssuer()
方法的一些代码示例,展示了Assertion.setIssuer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Assertion.setIssuer()
方法的具体详情如下:
包路径:org.opensaml.saml2.core.Assertion
类名称:Assertion
方法名:setIssuer
[英]Sets the Issuer of this assertion.
[中]设置此断言的颁发者。
代码示例来源:origin: cloudfoundry/uaa
private Assertion buildAssertion(Authentication authentication, AuthnRequest authnRequest,
IdpWebSSOProfileOptions options, String audienceURI, String issuerEntityId) throws SAMLException{
@SuppressWarnings("unchecked")
SAMLObjectBuilder<Assertion> assertionBuilder = (SAMLObjectBuilder<Assertion>) builderFactory
.getBuilder(Assertion.DEFAULT_ELEMENT_NAME);
Assertion assertion = assertionBuilder.buildObject();
assertion.setID(generateID());
assertion.setIssueInstant(new DateTime());
assertion.setVersion(SAMLVersion.VERSION_20);
assertion.setIssuer(getIssuer(issuerEntityId));
buildAssertionAuthnStatement(assertion);
buildAssertionConditions(assertion, options.getAssertionTimeToLiveSeconds(), audienceURI);
buildAssertionSubject(assertion, authnRequest, options.getAssertionTimeToLiveSeconds(),
(UaaPrincipal) authentication.getPrincipal());
buildAttributeStatement(assertion, authentication, audienceURI);
return assertion;
}
代码示例来源:origin: org.opensaml/opensaml
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException {
Assertion assertion = (Assertion) parentObject;
if (childObject instanceof Issuer) {
assertion.setIssuer((Issuer) childObject);
} else if (childObject instanceof Signature) {
assertion.setSignature((Signature) childObject);
} else if (childObject instanceof Subject) {
assertion.setSubject((Subject) childObject);
} else if (childObject instanceof Conditions) {
assertion.setConditions((Conditions) childObject);
} else if (childObject instanceof Advice) {
assertion.setAdvice((Advice) childObject);
} else if (childObject instanceof Statement) {
assertion.getStatements().add((Statement) childObject);
} else {
super.processChildElement(parentObject, childObject);
}
}
代码示例来源:origin: se.skltp.adapterservices.se.apotekensservice/TicketMachine
@Override
public Assertion build() {
AssertionBuilder assertionBuilder = (AssertionBuilder) xmlObjectBuilderFactory.getBuilder(Assertion.DEFAULT_ELEMENT_NAME);
Assertion assertion = assertionBuilder.buildObject();
assertion.setID(id);
assertion.setIssueInstant(issueInstant);
assertion.setVersion(SAMLVersion.VERSION_20);
assertion.setIssuer(issuer);
assertion.setSubject(subject);
assertion.setConditions(conditions);
if(signature !=null){
assertion.setSignature(signature);
}
if(authnStatements.size() > 0){
for (AuthnStatement authnStatement : authnStatements) {
assertion.getAuthnStatements().add(authnStatement);
}
}
if(attributeStatements.size() > 0){
for (AttributeStatement attributeStatement : attributeStatements) {
assertion.getAttributeStatements().add(attributeStatement);
}
}
return assertion;
}
代码示例来源:origin: OpenConext/Mujina
public static Assertion buildAssertion(SAMLPrincipal principal, Status status, String entityId) {
Assertion assertion = buildSAMLObject(Assertion.class, Assertion.DEFAULT_ELEMENT_NAME);
if (status.getStatusCode().getValue().equals(StatusCode.SUCCESS_URI)) {
Subject subject = buildSubject(principal.getNameID(), principal.getNameIDType(), principal.getAssertionConsumerServiceURL(), principal.getRequestID());
assertion.setSubject(subject);
}
Issuer issuer = buildIssuer(entityId);
Audience audience = buildSAMLObject(Audience.class, Audience.DEFAULT_ELEMENT_NAME);
audience.setAudienceURI(principal.getServiceProviderEntityID());
AudienceRestriction audienceRestriction = buildSAMLObject(AudienceRestriction.class, AudienceRestriction.DEFAULT_ELEMENT_NAME);
audienceRestriction.getAudiences().add(audience);
Conditions conditions = buildSAMLObject(Conditions.class, Conditions.DEFAULT_ELEMENT_NAME);
conditions.getAudienceRestrictions().add(audienceRestriction);
assertion.setConditions(conditions);
AuthnStatement authnStatement = buildAuthnStatement(new DateTime(), entityId);
assertion.setIssuer(issuer);
assertion.getAuthnStatements().add(authnStatement);
assertion.getAttributeStatements().add(buildAttributeStatement(principal.getAttributes()));
assertion.setID(randomSAMLId());
assertion.setIssueInstant(new DateTime());
return assertion;
}
代码示例来源:origin: usnistgov/iheos-toolkit2
assertionBean.getAttrBean()
);
assertion.setIssuer(samlIssuer);
org.opensaml.saml2.core.Conditions conditions =
SAMLAssertionBuilder.createConditions(assertionBean.getConditionsBean());
代码示例来源:origin: usnistgov/iheos-toolkit2
saml2.setIssuer(samlIssuer);
代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.identity.entitlement
Assertion assertion = assertionBuilder.buildObject();
assertion.setVersion(org.opensaml.common.SAMLVersion.VERSION_20);
assertion.setIssuer(createIssuer());
assertion.setIssueInstant(currentTime);
assertion.getStatements().add(xacmlAuthzDecisionStatement);
代码示例来源:origin: org.apache.rampart/rampart-trust
assertion.setIssuer(issuer);
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.entitlement
Assertion assertion = assertionBuilder.buildObject();
assertion.setVersion(org.opensaml.common.SAMLVersion.VERSION_20);
assertion.setIssuer(createIssuer());
assertion.setIssueInstant(currentTime);
assertion.getStatements().add(xacmlAuthzDecisionStatement);
代码示例来源:origin: wso2/carbon-identity-framework
Assertion assertion = assertionBuilder.buildObject();
assertion.setVersion(org.opensaml.common.SAMLVersion.VERSION_20);
assertion.setIssuer(createIssuer());
assertion.setIssueInstant(currentTime);
assertion.getStatements().add(xacmlAuthzDecisionStatement);
代码示例来源:origin: org.wso2.carbon.identity.inbound.auth.openid/org.wso2.carbon.identity.provider
assertion.setIssuer(issuer);
assertion.setIssueInstant(new DateTime());
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.provider
assertion.setIssuer(issuer);
assertion.setIssueInstant(new DateTime());
代码示例来源:origin: be.e_contract.sts/sts-client-cxf
assertion.setIssuer(issuer);
issuer.setValue("self-claimed");
代码示例来源:origin: org.apache.ws.security/wss4j
saml2.setIssuer(samlIssuer);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.wss4j
saml2.setIssuer(samlIssuer);
assertion.setID(SAML2AuthUtils.createID());
assertion.setVersion(SAMLVersion.VERSION_20);
assertion.setIssuer(getIssuer());
assertion.setIssueInstant(currentTime);
Subject subjectElem = new SubjectBuilder().buildObject();
samlAssertion.setID(SAMLSSOUtil.createID());
samlAssertion.setVersion(SAMLVersion.VERSION_20);
samlAssertion.setIssuer(SAMLSSOUtil.getIssuer());
samlAssertion.setIssueInstant(currentTime);
Subject subject = new SubjectBuilder().buildObject();
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.tools.saml.validator
samlAssertion.setID(SAMLSSOUtil.createID());
samlAssertion.setVersion(SAMLVersion.VERSION_20);
samlAssertion.setIssuer(SAMLSSOUtil.getIssuer());
samlAssertion.setIssueInstant(currentTime);
Subject subject = new SubjectBuilder().buildObject();
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.sso.saml
samlAssertion.setID(SAMLSSOUtil.createID());
samlAssertion.setVersion(SAMLVersion.VERSION_20);
samlAssertion.setIssuer(SAMLSSOUtil.getIssuer());
samlAssertion.setIssueInstant(currentTime);
Subject subject = new SubjectBuilder().buildObject();
代码示例来源:origin: org.wso2.carbon.identity.inbound.auth.saml.cloud/org.wso2.carbon.identity.sso.saml.cloud
samlAssertion.setID(SAMLSSOUtil.createID());
samlAssertion.setVersion(SAMLVersion.VERSION_20);
samlAssertion.setIssuer(SAMLSSOUtil.getIssuer());
samlAssertion.setIssueInstant(currentTime);
Subject subject = new SubjectBuilder().buildObject();
内容来源于网络,如有侵权,请联系作者删除!