/** * Create an AttributeStatement given an attribute * @param attributeValue * @return */ public static AttributeStatementType createAttributeStatement(String attributeValue) { AttributeStatementType attribStatement = new AttributeStatementType(); AttributeType att = new AttributeType( attributeValue ); att.addAttributeValue(attributeValue); attribStatement.addAttribute( new ASTChoiceType( att )); return attribStatement; }
/** * Given a user name, create a {@code SubjectType} that can then be inserted into an assertion * * @param userName * @return */ public static SubjectType createAssertionSubject(String userName) { SubjectType assertionSubject = new SubjectType(); STSubType subType = new STSubType(); NameIDType anil = new NameIDType(); anil.setValue(userName); subType.addBaseID(anil); assertionSubject.setSubType(subType); return assertionSubject; }
/** * Create an empty attribute statement * * @return */ public static AttributeStatementType createAttributeStatement() { return new AttributeStatementType(); }
/** * Extract the expiration time from an {@link AssertionType} * * @param assertion * @return */ public static XMLGregorianCalendar getExpiration(AssertionType assertion) { XMLGregorianCalendar expiry = null; ConditionsType conditionsType = assertion.getConditions(); if (conditionsType != null) { expiry = conditionsType.getNotOnOrAfter(); } return expiry; }
/** * Create a Subject confirmation type given the method * * @param method * * @return */ public static SubjectConfirmationType createSubjectConfirmation(String method) { SubjectConfirmationType sct = new SubjectConfirmationType(); sct.setMethod(method); return sct; }
/** * Set the issuer * * @param issuer {@link NameIDType} */ public void setIssuer(NameIDType issuer) { checkSTSPermission(); this.issuer = issuer; }
/** * Create an AttributeStatement given an attribute * * @param attributeValue * * @return */ public static AttributeStatementType createAttributeStatement(String attributeValue) { AttributeStatementType attribStatement = new AttributeStatementType(); AttributeType att = new AttributeType(attributeValue); att.addAttributeValue(attributeValue); attribStatement.addAttribute(new ASTChoiceType(att)); return attribStatement; }
/** * Create a Subject confirmation type given the method * @param method * @return */ public static SubjectConfirmationType createSubjectConfirmation(String method) { SubjectConfirmationType sct = new SubjectConfirmationType(); sct.setMethod(method); return sct; }
/** * Update the issue instant * * @param xg */ public void updateIssueInstant(XMLGregorianCalendar xg) { checkSTSPermission(); this.issueInstant = xg; }
/** * Create an AttributeStatement given an attribute * * @param attributeValue * @return */ public static AttributeStatementType createAttributeStatement(String attributeValue) { AttributeStatementType attribStatement = new AttributeStatementType(); AttributeType att = new AttributeType(attributeValue); att.addAttributeValue(attributeValue); attribStatement.addAttribute(new ASTChoiceType(att)); return attribStatement; }
/** * Set the advice * * @param advice {@link advice} */ public void setAdvice(AdviceType advice) { checkSTSPermission(); this.advice = advice; }
/** * Create an AttributeStatement given an attribute * @param attributeValue * @return */ public static AttributeStatementType createAttributeStatement(String attributeValue) { AttributeStatementType attribStatement = new AttributeStatementType(); AttributeType att = new AttributeType( attributeValue ); att.addAttributeValue(attributeValue); attribStatement.addAttribute( new ASTChoiceType( att )); return attribStatement; }
/** * Set the conditions * * @param conditions {@link ConditionsType} */ public void setConditions(ConditionsType conditions) { checkSTSPermission(); this.conditions = conditions; }
/** * Given an attribute type and a value, create {@link AttributeStatementType} * @param key attribute type * @param value attribute value * @return */ public static AttributeStatementType createAttributeStatement(String key, String value) { AttributeStatementType attrStatement = new AttributeStatementType(); AttributeType attr = new AttributeType(key); attr.addAttributeValue(value); attrStatement.addAttribute(new ASTChoiceType(attr)); return attrStatement; }
/** * Get the conditions * @return {@link ConditionsType} */ public ConditionsType getConditions() { checkSTSPermission(); return conditions; }
/** * Create an AttributeStatement given an attribute * * @param attributeValue * * @return */ public static AttributeStatementType createAttributeStatement(String attributeValue) { AttributeStatementType attribStatement = new AttributeStatementType(); AttributeType att = new AttributeType(attributeValue); att.addAttributeValue(attributeValue); attribStatement.addAttribute(new ASTChoiceType(att)); return attribStatement; }
/** * Set the conditions * @param conditions {@link ConditionsType} */ public void setConditions(ConditionsType conditions) { checkSTSPermission(); this.conditions = conditions; }
/** * Given an attribute type and a value, create {@link AttributeStatementType} * * @param key attribute type * @param value attribute value * * @return */ public static AttributeStatementType createAttributeStatement(String key, String value) { AttributeStatementType attrStatement = new AttributeStatementType(); AttributeType attr = new AttributeType(key); attr.addAttributeValue(value); attrStatement.addAttribute(new ASTChoiceType(attr)); return attrStatement; }
/** * Given an attribute type and a value, create {@link AttributeStatementType} * * @param key attribute type * @param value attribute value * @return */ public static AttributeStatementType createAttributeStatement(String key, String value) { AttributeStatementType attrStatement = new AttributeStatementType(); AttributeType attr = new AttributeType(key); attr.addAttributeValue(value); attrStatement.addAttribute(new ASTChoiceType(attr)); return attrStatement; }
/** * Given an attribute type and a value, create {@link AttributeStatementType} * @param key attribute type * @param value attribute value * @return */ public static AttributeStatementType createAttributeStatement(String key, String value) { AttributeStatementType attrStatement = new AttributeStatementType(); AttributeType attr = new AttributeType(key); attr.addAttributeValue(value); attrStatement.addAttribute(new ASTChoiceType(attr)); return attrStatement; }