You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by co...@apache.org on 2015/12/19 12:11:55 UTC
svn commit: r1720895 [7/34] - in /webservices/wss4j/branches/2_1_x-fixes:
bindings/src/main/java/org/apache/wss4j/binding/wss10/
bindings/src/main/java/org/apache/wss4j/binding/wss11/
bindings/src/main/java/org/apache/wss4j/binding/wssc13/ bindings/src...
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SAMLCallback.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SAMLCallback.java?rev=1720895&r1=1720894&r2=1720895&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SAMLCallback.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SAMLCallback.java Sat Dec 19 11:11:50 2015
@@ -43,37 +43,37 @@ import java.util.List;
* Assertion.
*/
public class SAMLCallback implements Callback {
-
+
/**
* The SAML Version of the Assertion to create
*/
private SAMLVersion samlVersion;
-
+
/**
* SAML subject representation
*/
private SubjectBean subject;
-
+
/**
* The issuer of the Assertion
*/
private String issuer;
-
+
/**
* The issuer format of the Assertion
*/
private String issuerFormat;
-
+
/**
* The issuer qualifier of the Assertion
*/
private String issuerQualifier;
-
+
/**
* SAML Conditions representation
*/
private ConditionsBean conditions;
-
+
/**
* SAML Advice representation
*/
@@ -93,12 +93,12 @@ public class SAMLCallback implements Cal
* A list of <code>AuthDecisionStatementBean</code> values
*/
private List<AuthDecisionStatementBean> authDecisionStatementData;
-
+
/**
* A DOM Element representation of this SAML Assertion
*/
private Element assertionElement;
-
+
private boolean signAssertion;
private String issuerKeyName;
@@ -112,7 +112,7 @@ public class SAMLCallback implements Cal
private String canonicalizationAlgorithm;
private String signatureAlgorithm;
-
+
private String signatureDigestAlgorithm;
/**
@@ -125,10 +125,10 @@ public class SAMLCallback implements Cal
}
/**
- * Method getAuthenticationStatementData returns the authenticationStatementData of this
+ * Method getAuthenticationStatementData returns the authenticationStatementData of this
* SAMLCallback object.
*
- * @return the authenticationStatementData (type List<AuthenticationStatementBean>) of
+ * @return the authenticationStatementData (type List<AuthenticationStatementBean>) of
* this SAMLCallback object.
*/
public List<AuthenticationStatementBean> getAuthenticationStatementData() {
@@ -136,10 +136,10 @@ public class SAMLCallback implements Cal
}
/**
- * Method setAuthenticationStatementData sets the authenticationStatementData of this
+ * Method setAuthenticationStatementData sets the authenticationStatementData of this
* SAMLCallback object.
*
- * @param authenticationStatementData the authenticationStatementData of this
+ * @param authenticationStatementData the authenticationStatementData of this
* SAMLCallback object.
*/
public void setAuthenticationStatementData(
@@ -149,10 +149,10 @@ public class SAMLCallback implements Cal
}
/**
- * Method getAttributeStatementData returns the attributeStatementData of this
+ * Method getAttributeStatementData returns the attributeStatementData of this
* SAMLCallback object.
*
- * @return the attributeStatementData (type List<AttributeStatementBean>) of this
+ * @return the attributeStatementData (type List<AttributeStatementBean>) of this
* SAMLCallback object.
*/
public List<AttributeStatementBean> getAttributeStatementData() {
@@ -169,10 +169,10 @@ public class SAMLCallback implements Cal
}
/**
- * Method getAuthDecisionStatementData returns the authDecisionStatementData of this
+ * Method getAuthDecisionStatementData returns the authDecisionStatementData of this
* SAMLCallback object.
*
- * @return the authDecisionStatementData (type List<AuthDecisionStatementBean>) of this
+ * @return the authDecisionStatementData (type List<AuthDecisionStatementBean>) of this
* SAMLCallback object.
*/
public List<AuthDecisionStatementBean> getAuthDecisionStatementData() {
@@ -180,10 +180,10 @@ public class SAMLCallback implements Cal
}
/**
- * Method setAuthDecisionStatementData sets the authDecisionStatementData of this
+ * Method setAuthDecisionStatementData sets the authDecisionStatementData of this
* SAMLCallback object.
*
- * @param authDecisionStatementData the authDecisionStatementData of this
+ * @param authDecisionStatementData the authDecisionStatementData of this
* SAMLCallback object.
*/
public void setAuthDecisionStatementData(
@@ -201,7 +201,7 @@ public class SAMLCallback implements Cal
if (subject != null) {
return subject;
}
-
+
// SAML 1.1 case
if (authenticationStatementData != null) {
for (AuthenticationStatementBean bean : authenticationStatementData) {
@@ -210,7 +210,7 @@ public class SAMLCallback implements Cal
}
}
}
-
+
if (attributeStatementData != null) {
for (AttributeStatementBean bean : attributeStatementData) {
if (bean.getSubject() != null) {
@@ -218,7 +218,7 @@ public class SAMLCallback implements Cal
}
}
}
-
+
if (authDecisionStatementData != null) {
for (AuthDecisionStatementBean bean : authDecisionStatementData) {
if (bean.getSubject() != null) {
@@ -226,7 +226,7 @@ public class SAMLCallback implements Cal
}
}
}
-
+
return null;
}
@@ -238,7 +238,7 @@ public class SAMLCallback implements Cal
public void setSubject(SubjectBean subject) {
this.subject = subject;
}
-
+
/**
* Method getIssuer returns the issuer of this SAMLCallback object.
*
@@ -256,7 +256,7 @@ public class SAMLCallback implements Cal
public void setIssuer(String issuer) {
this.issuer = issuer;
}
-
+
/**
* Method getConditions returns the conditions of this SAMLCallback object.
*
@@ -274,7 +274,7 @@ public class SAMLCallback implements Cal
public void setConditions(ConditionsBean conditions) {
this.conditions = conditions;
}
-
+
/**
* Set the SAMLVersion of the assertion to create
* @param samlVersion the SAMLVersion of the assertion to create
@@ -283,7 +283,7 @@ public class SAMLCallback implements Cal
public void setSamlVersion(SAMLVersion samlVersion) {
this.samlVersion = samlVersion;
}
-
+
/**
* Get the SAMLVersion of the assertion to create
* @return the SAMLVersion of the assertion to create
@@ -291,7 +291,7 @@ public class SAMLCallback implements Cal
public SAMLVersion getSamlVersion() {
return samlVersion;
}
-
+
/**
* Set the SAML Version of the assertion to create
* @param samlVersion the SAML Version of the assertion to create
@@ -305,7 +305,7 @@ public class SAMLCallback implements Cal
this.samlVersion = SAMLVersion.VERSION_10;
}
}
-
+
/**
* Set the DOM representation of this SAML Assertion
* @param assertionElement the DOM representation of this SAML Assertion
@@ -313,7 +313,7 @@ public class SAMLCallback implements Cal
public void setAssertionElement(Element assertionElement) {
this.assertionElement = assertionElement;
}
-
+
/**
* Get the DOM representation of this SAML Assertion
* @return the DOM representation of this SAML Assertion
@@ -321,7 +321,7 @@ public class SAMLCallback implements Cal
public Element getAssertionElement() {
return assertionElement;
}
-
+
public boolean isSignAssertion() {
return signAssertion;
}
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SAMLKeyInfo.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SAMLKeyInfo.java?rev=1720895&r1=1720894&r2=1720895&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SAMLKeyInfo.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SAMLKeyInfo.java Sat Dec 19 11:11:50 2015
@@ -32,17 +32,17 @@ public class SAMLKeyInfo {
* Certificates
*/
private X509Certificate[] certs;
-
+
/**
* Key bytes (e.g.: held in an encrypted key)
*/
private byte[] secret;
-
+
/**
* The public key {e.g.: held in a ds:KeyInfo).
*/
private PublicKey publicKey;
-
+
/**
* The private key
*/
@@ -54,11 +54,11 @@ public class SAMLKeyInfo {
public SAMLKeyInfo(X509Certificate[] certs) {
this.certs = certs;
}
-
+
public SAMLKeyInfo(byte[] secret) {
this.secret = secret;
}
-
+
public SAMLKeyInfo(PublicKey publicKey) {
this.publicKey = publicKey;
}
@@ -66,15 +66,15 @@ public class SAMLKeyInfo {
public X509Certificate[] getCerts() {
return certs;
}
-
+
public void setCerts(X509Certificate[] certs) {
this.certs = certs;
}
-
+
public byte[] getSecret() {
return secret;
}
-
+
public void setSecret(byte[] secret) {
this.secret = secret;
}
@@ -82,7 +82,7 @@ public class SAMLKeyInfo {
public PublicKey getPublicKey() {
return this.publicKey;
}
-
+
public void setPublicKey(PublicKey publicKey) {
this.publicKey = publicKey;
}
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SAMLKeyInfoProcessor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SAMLKeyInfoProcessor.java?rev=1720895&r1=1720894&r2=1720895&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SAMLKeyInfoProcessor.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SAMLKeyInfoProcessor.java Sat Dec 19 11:11:50 2015
@@ -26,6 +26,6 @@ import org.w3c.dom.Element;
* This interface allows the user to plug in custom ways of processing a SAML KeyInfo.
*/
public interface SAMLKeyInfoProcessor {
-
+
SAMLKeyInfo processSAMLKeyInfo(Element keyInfoElement) throws WSSecurityException;
}
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SAMLUtil.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SAMLUtil.java?rev=1720895&r1=1720894&r2=1720895&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SAMLUtil.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SAMLUtil.java Sat Dec 19 11:11:50 2015
@@ -47,12 +47,12 @@ import org.w3c.dom.Element;
* Utility methods for SAML stuff
*/
public final class SAMLUtil {
-
- private static final org.slf4j.Logger LOG =
+
+ private static final org.slf4j.Logger LOG =
org.slf4j.LoggerFactory.getLogger(SAMLUtil.class);
-
+
private static final String SIG_NS = "http://www.w3.org/2000/09/xmldsig#";
-
+
private SAMLUtil() {
// Complete
}
@@ -60,7 +60,7 @@ public final class SAMLUtil {
/**
* Parse a SAML Assertion to obtain a SAMLKeyInfo object from
* the Subject of the assertion
- *
+ *
* @param samlAssertion The SAML Assertion
* @param keyInfoProcessor A pluggable way to parse the KeyInfo
* @return a SAMLKeyInfo object
@@ -81,11 +81,11 @@ public final class SAMLUtil {
samlAssertion.getSaml2(), keyInfoProcessor, sigCrypto, callbackHandler
);
}
-
+
throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "empty",
new Object[] {"Cannot get credentials from an unknown SAML Assertion"});
}
-
+
/**
* Try to get the secret key from a CallbackHandler implementation
* @param cb a CallbackHandler implementation
@@ -96,7 +96,7 @@ public final class SAMLUtil {
CallbackHandler cb
) {
if (cb != null) {
- WSPasswordCallback pwcb =
+ WSPasswordCallback pwcb =
new WSPasswordCallback(id, WSPasswordCallback.SECRET_KEY);
try {
cb.handle(new Callback[]{pwcb});
@@ -108,9 +108,9 @@ public final class SAMLUtil {
}
return null;
}
-
+
/**
- * Get the SAMLKeyInfo object corresponding to the credential stored in the Subject of a
+ * Get the SAMLKeyInfo object corresponding to the credential stored in the Subject of a
* SAML 1.1 assertion
* @param assertion The SAML 1.1 assertion
* @param keyInfoProcessor A pluggable way to parse the KeyInfo
@@ -130,15 +130,15 @@ public final class SAMLUtil {
if (key != null && key.length > 0) {
return new SAMLKeyInfo(key);
}
-
+
for (org.opensaml.saml.saml1.core.Statement stmt : assertion.getStatements()) {
org.opensaml.saml.saml1.core.Subject samlSubject = null;
if (stmt instanceof org.opensaml.saml.saml1.core.AttributeStatement) {
- org.opensaml.saml.saml1.core.AttributeStatement attrStmt =
+ org.opensaml.saml.saml1.core.AttributeStatement attrStmt =
(org.opensaml.saml.saml1.core.AttributeStatement) stmt;
samlSubject = attrStmt.getSubject();
} else if (stmt instanceof org.opensaml.saml.saml1.core.AuthenticationStatement) {
- org.opensaml.saml.saml1.core.AuthenticationStatement authStmt =
+ org.opensaml.saml.saml1.core.AuthenticationStatement authStmt =
(org.opensaml.saml.saml1.core.AuthenticationStatement) stmt;
samlSubject = authStmt.getSubject();
} else {
@@ -146,10 +146,10 @@ public final class SAMLUtil {
(org.opensaml.saml.saml1.core.AuthorizationDecisionStatement)stmt;
samlSubject = authzStmt.getSubject();
}
-
+
if (samlSubject != null && samlSubject.getSubjectConfirmation() != null) {
Element sub = samlSubject.getSubjectConfirmation().getDOM();
- Element keyInfoElement =
+ Element keyInfoElement =
XMLUtils.getDirectChildElement(sub, "KeyInfo", SIG_NS);
if (keyInfoElement != null) {
return getCredentialFromKeyInfo(
@@ -161,9 +161,9 @@ public final class SAMLUtil {
return null;
}
-
+
/**
- * Get the SAMLKeyInfo object corresponding to the credential stored in the Subject of a
+ * Get the SAMLKeyInfo object corresponding to the credential stored in the Subject of a
* SAML 2 assertion
* @param assertion The SAML 2 assertion
* @param keyInfoProcessor A pluggable way to parse the KeyInfo
@@ -183,17 +183,17 @@ public final class SAMLUtil {
if (key != null && key.length > 0) {
return new SAMLKeyInfo(key);
}
-
+
org.opensaml.saml.saml2.core.Subject samlSubject = assertion.getSubject();
if (samlSubject != null) {
- List<org.opensaml.saml.saml2.core.SubjectConfirmation> subjectConfList =
+ List<org.opensaml.saml.saml2.core.SubjectConfirmation> subjectConfList =
samlSubject.getSubjectConfirmations();
for (org.opensaml.saml.saml2.core.SubjectConfirmation subjectConfirmation : subjectConfList) {
- SubjectConfirmationData subjConfData =
+ SubjectConfirmationData subjConfData =
subjectConfirmation.getSubjectConfirmationData();
if (subjConfData != null) {
Element sub = subjConfData.getDOM();
- Element keyInfoElement =
+ Element keyInfoElement =
XMLUtils.getDirectChildElement(sub, "KeyInfo", SIG_NS);
if (keyInfoElement != null) {
return getCredentialFromKeyInfo(
@@ -206,7 +206,7 @@ public final class SAMLUtil {
return null;
}
-
+
/**
* This method returns a SAMLKeyInfo corresponding to the credential found in the
* KeyInfo (DOM Element) argument.
@@ -230,7 +230,7 @@ public final class SAMLUtil {
return samlKeyInfo;
}
}
-
+
//
// Next marshal the KeyInfo DOM element into a javax KeyInfo object and get the
// (public key) credential
@@ -245,7 +245,7 @@ public final class SAMLUtil {
XMLStructure keyInfoStructure = new DOMStructure(keyInfoElement);
try {
- javax.xml.crypto.dsig.keyinfo.KeyInfo keyInfo =
+ javax.xml.crypto.dsig.keyinfo.KeyInfo keyInfo =
keyInfoFactory.unmarshalKeyInfo(keyInfoStructure);
List<?> list = keyInfo.getContent();
@@ -270,7 +270,7 @@ public final class SAMLUtil {
}
CryptoType cryptoType = new CryptoType(CryptoType.TYPE.ISSUER_SERIAL);
cryptoType.setIssuerSerial(
- ((X509IssuerSerial)x509obj).getIssuerName(),
+ ((X509IssuerSerial)x509obj).getIssuerName(),
((X509IssuerSerial)x509obj).getSerialNumber()
);
certs = sigCrypto.getX509Certificates(cryptoType);
@@ -293,7 +293,7 @@ public final class SAMLUtil {
}
return null;
}
-
+
public static void doSAMLCallback(
CallbackHandler callbackHandler, SAMLCallback callback
) {
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java?rev=1720895&r1=1720894&r2=1720895&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java Sat Dec 19 11:11:50 2015
@@ -76,7 +76,7 @@ public class SamlAssertionWrapper {
/**
* Field log
*/
- private static final org.slf4j.Logger LOG =
+ private static final org.slf4j.Logger LOG =
org.slf4j.LoggerFactory.getLogger(SamlAssertionWrapper.class);
/**
@@ -93,12 +93,12 @@ public class SamlAssertionWrapper {
* The Assertion as a DOM element
*/
private Element assertionElement;
-
+
/**
* The SAMLKeyInfo object associated with the Subject KeyInfo
*/
private SAMLKeyInfo subjectKeyInfo;
-
+
/**
* The SAMLKeyInfo object associated with the Signature on the Assertion
*/
@@ -118,17 +118,17 @@ public class SamlAssertionWrapper {
* Default DSA Signature algorithm used for signing.
*/
private final String defaultDSASignatureAlgorithm = SignatureConstants.ALGO_ID_SIGNATURE_DSA;
-
+
/**
* Default Signature Digest algorithm
*/
private final String defaultSignatureDigestAlgorithm = SignatureConstants.ALGO_ID_DIGEST_SHA1;
-
+
/**
* Whether this object was instantiated with a DOM Element or an XMLObject initially
*/
private final boolean fromDOM;
-
+
/**
* Constructor SamlAssertionWrapper creates a new SamlAssertionWrapper instance.
*
@@ -137,7 +137,7 @@ public class SamlAssertionWrapper {
*/
public SamlAssertionWrapper(Element element) throws WSSecurityException {
OpenSAMLUtil.initSamlEngine();
-
+
parseElement(element);
fromDOM = true;
}
@@ -152,7 +152,7 @@ public class SamlAssertionWrapper {
*/
public SamlAssertionWrapper(SAMLObject samlObject) throws WSSecurityException {
OpenSAMLUtil.initSamlEngine();
-
+
this.samlObject = samlObject;
if (samlObject instanceof org.opensaml.saml.saml1.core.Assertion) {
samlVersion = SAMLVersion.VERSION_11;
@@ -169,7 +169,7 @@ public class SamlAssertionWrapper {
}
fromDOM = false;
}
-
+
/**
* Constructor SamlAssertionWrapper creates a new SamlAssertionWrapper instance.
* This constructor is primarily called on the client side to initialize
@@ -295,7 +295,7 @@ public class SamlAssertionWrapper {
} else if (samlVersion == SAMLVersion.VERSION_11
&& ((org.opensaml.saml.saml1.core.Assertion)samlObject).getIssuer() != null) {
return ((org.opensaml.saml.saml1.core.Assertion)samlObject).getIssuer();
- }
+ }
LOG.error(
"SamlAssertionWrapper: unable to return Issuer string - no saml assertion "
+ "object or issuer is null"
@@ -309,7 +309,7 @@ public class SamlAssertionWrapper {
*/
public String getSubjectName() {
if (samlVersion == SAMLVersion.VERSION_20) {
- org.opensaml.saml.saml2.core.Subject subject =
+ org.opensaml.saml.saml2.core.Subject subject =
((org.opensaml.saml.saml2.core.Assertion)samlObject).getSubject();
if (subject != null && subject.getNameID() != null) {
return subject.getNameID().getValue();
@@ -324,7 +324,7 @@ public class SamlAssertionWrapper {
AuthenticationStatement authStmt = (AuthenticationStatement) stmt;
samlSubject = authStmt.getSubject();
} else {
- AuthorizationDecisionStatement authzStmt =
+ AuthorizationDecisionStatement authzStmt =
(AuthorizationDecisionStatement)stmt;
samlSubject = authzStmt.getSubject();
}
@@ -344,7 +344,7 @@ public class SamlAssertionWrapper {
}
/**
- * Method getConfirmationMethods returns the confirmationMethods of this
+ * Method getConfirmationMethods returns the confirmationMethods of this
* SamlAssertionWrapper object.
*
* @return the confirmationMethods of this SamlAssertionWrapper object.
@@ -352,16 +352,16 @@ public class SamlAssertionWrapper {
public List<String> getConfirmationMethods() {
List<String> methods = new ArrayList<>();
if (samlVersion == SAMLVersion.VERSION_20) {
- org.opensaml.saml.saml2.core.Subject subject =
+ org.opensaml.saml.saml2.core.Subject subject =
((org.opensaml.saml.saml2.core.Assertion)samlObject).getSubject();
- List<org.opensaml.saml.saml2.core.SubjectConfirmation> confirmations =
+ List<org.opensaml.saml.saml2.core.SubjectConfirmation> confirmations =
subject.getSubjectConfirmations();
for (org.opensaml.saml.saml2.core.SubjectConfirmation confirmation : confirmations) {
methods.add(confirmation.getMethod());
}
} else if (samlVersion == SAMLVersion.VERSION_11) {
List<SubjectStatement> subjectStatements = new ArrayList<>();
- org.opensaml.saml.saml1.core.Assertion saml1 =
+ org.opensaml.saml.saml1.core.Assertion saml1 =
((org.opensaml.saml.saml1.core.Assertion)samlObject);
subjectStatements.addAll(saml1.getSubjectStatements());
subjectStatements.addAll(saml1.getAuthenticationStatements());
@@ -377,7 +377,7 @@ public class SamlAssertionWrapper {
ConfirmationMethod method = (ConfirmationMethod) data;
methods.add(method.getConfirmationMethod());
}
- List<ConfirmationMethod> confirmationMethods =
+ List<ConfirmationMethod> confirmationMethods =
confirmation.getConfirmationMethods();
for (ConfirmationMethod confirmationMethod : confirmationMethods) {
methods.add(confirmationMethod.getConfirmationMethod());
@@ -395,8 +395,8 @@ public class SamlAssertionWrapper {
* @return the signed (type boolean) of this SamlAssertionWrapper object.
*/
public boolean isSigned() {
- if (samlObject instanceof SignableSAMLObject
- && (((SignableSAMLObject)samlObject).isSigned()
+ if (samlObject instanceof SignableSAMLObject
+ && (((SignableSAMLObject)samlObject).isSigned()
|| ((SignableSAMLObject)samlObject).getSignature() != null)) {
return true;
}
@@ -411,7 +411,7 @@ public class SamlAssertionWrapper {
public void setSignature(Signature signature) {
setSignature(signature, defaultSignatureDigestAlgorithm);
}
-
+
/**
* Method setSignature sets the signature of this SamlAssertionWrapper object.
*
@@ -426,7 +426,7 @@ public class SamlAssertionWrapper {
if (digestAlg == null) {
digestAlg = defaultSignatureDigestAlgorithm;
}
- SAMLObjectContentReference contentRef =
+ SAMLObjectContentReference contentRef =
(SAMLObjectContentReference)signature.getContentReferences().get(0);
contentRef.setDigestAlgorithm(digestAlg);
signableObject.releaseDOM();
@@ -435,10 +435,10 @@ public class SamlAssertionWrapper {
LOG.error("Attempt to sign an unsignable object " + samlObject.getClass().getName());
}
}
-
+
/**
* Create an enveloped signature on the assertion that has been created.
- *
+ *
* @param issuerKeyName the Issuer KeyName to use with the issuerCrypto argument
* @param issuerKeyPassword the Issuer Password to use with the issuerCrypto argument
* @param issuerCrypto the Issuer Crypto instance
@@ -453,10 +453,10 @@ public class SamlAssertionWrapper {
sendKeyValue, defaultCanonicalizationAlgorithm,
defaultRSASignatureAlgorithm, defaultSignatureDigestAlgorithm);
}
-
+
/**
* Create an enveloped signature on the assertion that has been created.
- *
+ *
* @param issuerKeyName the Issuer KeyName to use with the issuerCrypto argument
* @param issuerKeyPassword the Issuer Password to use with the issuerCrypto argument
* @param issuerCrypto the Issuer Crypto instance
@@ -472,10 +472,10 @@ public class SamlAssertionWrapper {
signAssertion(issuerKeyName, issuerKeyPassword, issuerCrypto, sendKeyValue,
canonicalizationAlgorithm, signatureAlgorithm, defaultSignatureDigestAlgorithm);
}
-
+
/**
* Create an enveloped signature on the assertion that has been created.
- *
+ *
* @param issuerKeyName the Issuer KeyName to use with the issuerCrypto argument
* @param issuerKeyPassword the Issuer Password to use with the issuerCrypto argument
* @param issuerCrypto the Issuer Crypto instance
@@ -539,7 +539,7 @@ public class SamlAssertionWrapper {
signature.setSignatureAlgorithm(sigAlgo);
- BasicX509Credential signingCredential =
+ BasicX509Credential signingCredential =
new BasicX509Credential(issuerCerts[0], privateKey);
signature.setSigningCredential(signingCredential);
@@ -579,7 +579,7 @@ public class SamlAssertionWrapper {
new Object[] {"cannot get certificate or key"}
);
}
- SAMLKeyInfo samlKeyInfo =
+ SAMLKeyInfo samlKeyInfo =
SAMLUtil.getCredentialFromKeyInfo(keyInfo.getDOM(), keyInfoProcessor, sigCrypto);
verifySignature(samlKeyInfo);
} else {
@@ -587,7 +587,7 @@ public class SamlAssertionWrapper {
}
}
-
+
/**
* Verify the signature of this assertion
*
@@ -619,7 +619,7 @@ public class SamlAssertionWrapper {
Thread.currentThread().setContextClassLoader(SignerProvider.class.getClassLoader());
SignatureValidator.validate(sig, credential);
} catch (SignatureException ex) {
- throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, ex,
+ throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, ex,
"empty", new Object[] {"SAML signature validation failed"});
} finally {
Thread.currentThread().setContextClassLoader(loader);
@@ -629,7 +629,7 @@ public class SamlAssertionWrapper {
LOG.debug("SamlAssertionWrapper: no signature to validate");
}
}
-
+
/**
* Validate the signature of the Assertion against the Profile. This does not actually
* verify the signature itself (see the verifySignature method for this)
@@ -647,7 +647,7 @@ public class SamlAssertionWrapper {
}
}
}
-
+
/**
* This method parses the KeyInfo of the Subject. It then stores the SAMLKeyInfo object that
* has been obtained for future processing.
@@ -659,20 +659,20 @@ public class SamlAssertionWrapper {
CallbackHandler callbackHandler
) throws WSSecurityException {
if (samlVersion == SAMLVersion.VERSION_11) {
- subjectKeyInfo =
+ subjectKeyInfo =
SAMLUtil.getCredentialFromSubject(
- (org.opensaml.saml.saml1.core.Assertion)samlObject, keyInfoProcessor,
+ (org.opensaml.saml.saml1.core.Assertion)samlObject, keyInfoProcessor,
sigCrypto, callbackHandler
);
} else if (samlVersion == SAMLVersion.VERSION_20) {
- subjectKeyInfo =
+ subjectKeyInfo =
SAMLUtil.getCredentialFromSubject(
- (org.opensaml.saml.saml2.core.Assertion)samlObject, keyInfoProcessor,
+ (org.opensaml.saml.saml2.core.Assertion)samlObject, keyInfoProcessor,
sigCrypto, callbackHandler
);
}
}
-
+
/**
* Method getSamlVersion returns the samlVersion of this SamlAssertionWrapper object.
@@ -709,7 +709,7 @@ public class SamlAssertionWrapper {
public Element getElement() {
return assertionElement;
}
-
+
/**
* Get the SAMLKeyInfo associated with the signature of the assertion
* @return the SAMLKeyInfo associated with the signature of the assertion
@@ -717,7 +717,7 @@ public class SamlAssertionWrapper {
public SAMLKeyInfo getSignatureKeyInfo() {
return signatureKeyInfo;
}
-
+
/**
* Get the SAMLKeyInfo associated with the Subject KeyInfo
* @return the SAMLKeyInfo associated with the Subject KeyInfo
@@ -725,10 +725,10 @@ public class SamlAssertionWrapper {
public SAMLKeyInfo getSubjectKeyInfo() {
return subjectKeyInfo;
}
-
+
/**
- * Get the SignatureValue bytes of the signed SAML Assertion
- * @return the SignatureValue bytes of the signed SAML Assertion
+ * Get the SignatureValue bytes of the signed SAML Assertion
+ * @return the SignatureValue bytes of the signed SAML Assertion
* @throws WSSecurityException
*/
public byte[] getSignatureValue() throws WSSecurityException {
@@ -741,14 +741,14 @@ public class SamlAssertionWrapper {
}
return null;
}
-
+
private byte[] getSignatureValue(Signature signature) throws WSSecurityException {
Element signatureElement = signature.getDOM();
-
+
if (signatureElement != null) {
Element signedInfoElem = XMLUtils.getNextElement(signatureElement.getFirstChild());
if (signedInfoElem != null) {
- Element signatureValueElement =
+ Element signatureValueElement =
XMLUtils.getNextElement(signedInfoElem.getNextSibling());
if (signatureValueElement != null) {
try {
@@ -761,7 +761,7 @@ public class SamlAssertionWrapper {
}
}
}
-
+
return null;
}
@@ -771,18 +771,18 @@ public class SamlAssertionWrapper {
}
return null;
}
-
+
public SAMLObject getSamlObject() {
return samlObject;
}
-
+
/**
* Check the Conditions of the Assertion.
*/
public void checkConditions(int futureTTL) throws WSSecurityException {
DateTime validFrom = null;
DateTime validTill = null;
-
+
if (getSamlVersion().equals(SAMLVersion.VERSION_20)
&& getSaml2().getConditions() != null) {
validFrom = getSaml2().getConditions().getNotBefore();
@@ -792,7 +792,7 @@ public class SamlAssertionWrapper {
validFrom = getSaml1().getConditions().getNotBefore();
validTill = getSaml1().getConditions().getNotOnOrAfter();
}
-
+
if (validFrom != null) {
DateTime currentTime = new DateTime();
currentTime = currentTime.plusSeconds(futureTTL);
@@ -807,14 +807,14 @@ public class SamlAssertionWrapper {
throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
}
}
-
+
/**
* Check the IssueInstant value of the Assertion.
*/
public void checkIssueInstant(int futureTTL, int ttl) throws WSSecurityException {
DateTime issueInstant = null;
DateTime validTill = null;
-
+
if (getSamlVersion().equals(SAMLVersion.VERSION_20)
&& getSaml2().getConditions() != null) {
validTill = getSaml2().getConditions().getNotOnOrAfter();
@@ -824,7 +824,7 @@ public class SamlAssertionWrapper {
validTill = getSaml1().getConditions().getNotOnOrAfter();
issueInstant = getSaml1().getIssueInstant();
}
-
+
// Check the IssueInstant is not in the future, subject to the future TTL
if (issueInstant != null) {
DateTime currentTime = new DateTime();
@@ -833,21 +833,21 @@ public class SamlAssertionWrapper {
LOG.debug("SAML Token IssueInstant not met");
throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
}
-
+
// If there is no NotOnOrAfter, then impose a TTL on the IssueInstant.
if (validTill == null) {
currentTime = new DateTime();
currentTime.minusSeconds(ttl);
-
+
if (issueInstant.isBefore(currentTime)) {
LOG.debug("SAML Token IssueInstant not met. The assertion was created too long ago.");
throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
}
}
}
-
+
}
-
+
/**
* Check the AudienceRestrictions of the Assertion
*/
@@ -856,16 +856,16 @@ public class SamlAssertionWrapper {
if (audienceRestrictions == null || audienceRestrictions.isEmpty()) {
return;
}
-
+
if (getSamlVersion().equals(SAMLVersion.VERSION_20) && getSaml2().getConditions() != null) {
org.opensaml.saml.saml2.core.Conditions conditions = getSaml2().getConditions();
if (conditions != null && conditions.getAudienceRestrictions() != null
&& !conditions.getAudienceRestrictions().isEmpty()) {
boolean foundAddress = false;
- for (org.opensaml.saml.saml2.core.AudienceRestriction audienceRestriction
+ for (org.opensaml.saml.saml2.core.AudienceRestriction audienceRestriction
: conditions.getAudienceRestrictions()) {
if (audienceRestriction.getAudiences() != null) {
- List<org.opensaml.saml.saml2.core.Audience> audiences =
+ List<org.opensaml.saml.saml2.core.Audience> audiences =
audienceRestriction.getAudiences();
for (org.opensaml.saml.saml2.core.Audience audience : audiences) {
String audienceURI = audience.getAudienceURI();
@@ -876,7 +876,7 @@ public class SamlAssertionWrapper {
}
}
}
-
+
if (!foundAddress) {
throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
}
@@ -886,10 +886,10 @@ public class SamlAssertionWrapper {
if (conditions != null && conditions.getAudienceRestrictionConditions() != null
&& !conditions.getAudienceRestrictionConditions().isEmpty()) {
boolean foundAddress = false;
- for (org.opensaml.saml.saml1.core.AudienceRestrictionCondition audienceRestriction
+ for (org.opensaml.saml.saml1.core.AudienceRestrictionCondition audienceRestriction
: conditions.getAudienceRestrictionConditions()) {
if (audienceRestriction.getAudiences() != null) {
- List<org.opensaml.saml.saml1.core.Audience> audiences =
+ List<org.opensaml.saml.saml1.core.Audience> audiences =
audienceRestriction.getAudiences();
for (org.opensaml.saml.saml1.core.Audience audience : audiences) {
String audienceURI = audience.getUri();
@@ -900,14 +900,14 @@ public class SamlAssertionWrapper {
}
}
}
-
+
if (!foundAddress) {
throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
}
}
}
}
-
+
/**
* Check the various attributes of the AuthnStatements of the assertion (if any)
*/
@@ -915,7 +915,7 @@ public class SamlAssertionWrapper {
if (getSamlVersion().equals(SAMLVersion.VERSION_20)
&& getSaml2().getAuthnStatements() != null) {
List<AuthnStatement> authnStatements = getSaml2().getAuthnStatements();
-
+
for (AuthnStatement authnStatement : authnStatements) {
DateTime authnInstant = authnStatement.getAuthnInstant();
DateTime sessionNotOnOrAfter = authnStatement.getSessionNotOnOrAfter();
@@ -925,15 +925,15 @@ public class SamlAssertionWrapper {
&& authnStatement.getSubjectLocality().getAddress() != null) {
subjectLocalityAddress = authnStatement.getSubjectLocality().getAddress();
}
-
- validateAuthnStatement(authnInstant, sessionNotOnOrAfter,
+
+ validateAuthnStatement(authnInstant, sessionNotOnOrAfter,
subjectLocalityAddress, futureTTL);
}
} else if (getSamlVersion().equals(SAMLVersion.VERSION_11)
&& getSaml1().getAuthenticationStatements() != null) {
- List<AuthenticationStatement> authnStatements =
+ List<AuthenticationStatement> authnStatements =
getSaml1().getAuthenticationStatements();
-
+
for (AuthenticationStatement authnStatement : authnStatements) {
DateTime authnInstant = authnStatement.getAuthenticationInstant();
String subjectLocalityAddress = null;
@@ -942,13 +942,13 @@ public class SamlAssertionWrapper {
&& authnStatement.getSubjectLocality().getIPAddress() != null) {
subjectLocalityAddress = authnStatement.getSubjectLocality().getIPAddress();
}
-
- validateAuthnStatement(authnInstant, null,
+
+ validateAuthnStatement(authnInstant, null,
subjectLocalityAddress, futureTTL);
}
}
}
-
+
private void validateAuthnStatement(
DateTime authnInstant, DateTime sessionNotOnOrAfter, String subjectLocalityAddress,
int futureTTL
@@ -960,13 +960,13 @@ public class SamlAssertionWrapper {
LOG.debug("SAML Token AuthnInstant not met");
throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
}
-
+
// Stale SessionNotOnOrAfter
if (sessionNotOnOrAfter != null && sessionNotOnOrAfter.isBeforeNow()) {
LOG.debug("SAML Token SessionNotOnOrAfter not met");
throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
}
-
+
// Check that the SubjectLocality address is an IP address
if (subjectLocalityAddress != null
&& !(InetAddressUtils.isIPv4Address(subjectLocalityAddress)
@@ -975,7 +975,7 @@ public class SamlAssertionWrapper {
throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
}
}
-
+
/**
* Parse the DOM Element into Opensaml objects.
*/
@@ -993,10 +993,10 @@ public class SamlAssertionWrapper {
+ (xmlObject != null ? xmlObject.getClass().getName() : xmlObject)
);
}
-
+
assertionElement = element;
}
-
+
/**
* Parse a SAMLCallback object to create a SAML Assertion
*/
@@ -1010,41 +1010,41 @@ public class SamlAssertionWrapper {
String issuer = samlCallback.getIssuer();
String issuerFormat = samlCallback.getIssuerFormat();
String issuerQualifier = samlCallback.getIssuerQualifier();
-
+
if (samlVersion.equals(SAMLVersion.VERSION_11)) {
// Build a SAML v1.1 assertion
- org.opensaml.saml.saml1.core.Assertion saml1 =
+ org.opensaml.saml.saml1.core.Assertion saml1 =
SAML1ComponentBuilder.createSamlv1Assertion(issuer);
try {
// Process the SAML authentication statement(s)
- List<AuthenticationStatement> authenticationStatements =
+ List<AuthenticationStatement> authenticationStatements =
SAML1ComponentBuilder.createSamlv1AuthenticationStatement(
samlCallback.getAuthenticationStatementData()
);
saml1.getAuthenticationStatements().addAll(authenticationStatements);
-
- // Process the SAML attribute statement(s)
+
+ // Process the SAML attribute statement(s)
List<AttributeStatement> attributeStatements =
SAML1ComponentBuilder.createSamlv1AttributeStatement(
samlCallback.getAttributeStatementData()
);
saml1.getAttributeStatements().addAll(attributeStatements);
-
+
// Process the SAML authorization decision statement(s)
List<AuthorizationDecisionStatement> authDecisionStatements =
SAML1ComponentBuilder.createSamlv1AuthorizationDecisionStatement(
samlCallback.getAuthDecisionStatementData()
);
saml1.getAuthorizationDecisionStatements().addAll(authDecisionStatements);
-
+
// Build the complete assertion
- org.opensaml.saml.saml1.core.Conditions conditions =
+ org.opensaml.saml.saml1.core.Conditions conditions =
SAML1ComponentBuilder.createSamlv1Conditions(samlCallback.getConditions());
saml1.setConditions(conditions);
-
+
if (samlCallback.getAdvice() != null) {
- org.opensaml.saml.saml1.core.Advice advice =
+ org.opensaml.saml.saml1.core.Advice advice =
SAML1ComponentBuilder.createAdvice(samlCallback.getAdvice());
saml1.setAdvice(advice);
}
@@ -1063,14 +1063,14 @@ public class SamlAssertionWrapper {
Issuer samlIssuer = SAML2ComponentBuilder.createIssuer(issuer, issuerFormat, issuerQualifier);
// Authn Statement(s)
- List<AuthnStatement> authnStatements =
+ List<AuthnStatement> authnStatements =
SAML2ComponentBuilder.createAuthnStatement(
samlCallback.getAuthenticationStatementData()
);
saml2.getAuthnStatements().addAll(authnStatements);
// Attribute statement(s)
- List<org.opensaml.saml.saml2.core.AttributeStatement> attributeStatements =
+ List<org.opensaml.saml.saml2.core.AttributeStatement> attributeStatements =
SAML2ComponentBuilder.createAttributeStatement(
samlCallback.getAttributeStatementData()
);
@@ -1085,9 +1085,9 @@ public class SamlAssertionWrapper {
// Build the SAML v2.0 assertion
saml2.setIssuer(samlIssuer);
-
+
try {
- org.opensaml.saml.saml2.core.Subject subject =
+ org.opensaml.saml.saml2.core.Subject subject =
SAML2ComponentBuilder.createSaml2Subject(samlCallback.getSubject());
saml2.setSubject(subject);
} catch (org.opensaml.security.SecurityException ex) {
@@ -1095,13 +1095,13 @@ public class SamlAssertionWrapper {
new Object[] {"Error generating KeyInfo from signing credential"}
);
}
-
- org.opensaml.saml.saml2.core.Conditions conditions =
+
+ org.opensaml.saml.saml2.core.Conditions conditions =
SAML2ComponentBuilder.createConditions(samlCallback.getConditions());
saml2.setConditions(conditions);
-
+
if (samlCallback.getAdvice() != null) {
- org.opensaml.saml.saml2.core.Advice advice =
+ org.opensaml.saml.saml2.core.Advice advice =
SAML2ComponentBuilder.createAdvice(samlCallback.getAdvice());
saml2.setAdvice(advice);
}
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/ActionBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/ActionBean.java?rev=1720895&r1=1720894&r2=1720895&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/ActionBean.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/ActionBean.java Sat Dec 19 11:11:50 2015
@@ -26,15 +26,15 @@ package org.apache.wss4j.common.saml.bea
*/
public class ActionBean {
- /**
+ /**
* A URI reference representing the namespace in which the name of the specified action is to be
- * interpreted. If this element is absent, the namespace
- * urn:oasis:names:tc:SAML:1.0:action:rwedcnegation specified in Section 7.2.2 is in effect.
+ * interpreted. If this element is absent, the namespace
+ * urn:oasis:names:tc:SAML:1.0:action:rwedcnegation specified in Section 7.2.2 is in effect.
*/
private String actionNamespace;
- /**
- * An action sought to be performed on the specified resource (i.e. Read, Write, Update, Delete)
+ /**
+ * An action sought to be performed on the specified resource (i.e. Read, Write, Update, Delete)
*/
private String contents;
@@ -90,7 +90,7 @@ public class ActionBean {
public void setContents(String contents) {
this.contents = contents;
}
-
+
@Override
public boolean equals(Object o) {
if (this == o) {
@@ -107,7 +107,7 @@ public class ActionBean {
} else if (contents != null && !contents.equals(that.contents)) {
return false;
}
-
+
if (actionNamespace == null && that.actionNamespace != null) {
return false;
} else if (actionNamespace != null && !actionNamespace.equals(that.actionNamespace)) {
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AdviceBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AdviceBean.java?rev=1720895&r1=1720894&r2=1720895&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AdviceBean.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AdviceBean.java Sat Dec 19 11:11:50 2015
@@ -29,23 +29,23 @@ import org.w3c.dom.Element;
* Represents a SAML Advice Element.
*/
public class AdviceBean {
-
+
private List<String> idReferences = new ArrayList<>();
private List<String> uriReferences = new ArrayList<>();
private List<Element> assertions = new ArrayList<>();
-
+
public List<String> getIdReferences() {
return idReferences;
}
-
+
public List<String> getUriReferences() {
return uriReferences;
}
-
+
public List<Element> getAssertions() {
return assertions;
}
-
+
@Override
public boolean equals(Object o) {
if (this == o) {
@@ -62,19 +62,19 @@ public class AdviceBean {
} else if (idReferences != null && !idReferences.equals(that.idReferences)) {
return false;
}
-
+
if (uriReferences == null && that.uriReferences != null) {
return false;
} else if (uriReferences != null && !uriReferences.equals(that.uriReferences)) {
return false;
}
-
+
if (assertions == null && that.assertions != null) {
return false;
} else if (assertions != null && !assertions.equals(that.assertions)) {
return false;
}
-
+
return true;
}
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AttributeBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AttributeBean.java?rev=1720895&r1=1720894&r2=1720895&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AttributeBean.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AttributeBean.java Sat Dec 19 11:11:50 2015
@@ -40,7 +40,7 @@ public class AttributeBean {
/**
* Constructor SamlAttribute creates a new SamlAttribute instance.
- *
+ *
* @param simpleName of type String
* @param qualifiedName of type String
* @param attributeValues of type List<Object>
@@ -68,16 +68,16 @@ public class AttributeBean {
public void setSimpleName(String simpleName) {
this.simpleName = simpleName;
}
-
+
/**
* Method getNameFormat returns the nameFormat of this SamlAttribute object
- *
+ *
* @return he nameFormat of this SamlAttribute object
*/
public String getNameFormat() {
return nameFormat;
}
-
+
/**
* Method setNameFormat sets the nameFormat of this SamlAttribute object.
*
@@ -122,14 +122,14 @@ public class AttributeBean {
public void setAttributeValues(List<Object> attributeValues) {
this.attributeValues = attributeValues;
}
-
+
public void addAttributeValue(Object attributeValue) {
if (attributeValues == null) {
attributeValues = new ArrayList<>();
}
attributeValues.add(attributeValue);
}
-
+
@Override
public boolean equals(Object o) {
if (this == o) {
@@ -146,19 +146,19 @@ public class AttributeBean {
} else if (attributeValues != null && !attributeValues.equals(that.attributeValues)) {
return false;
}
-
+
if (qualifiedName == null && that.qualifiedName != null) {
return false;
} else if (qualifiedName != null && !qualifiedName.equals(that.qualifiedName)) {
return false;
}
-
+
if (nameFormat == null && that.nameFormat != null) {
return false;
} else if (nameFormat != null && !nameFormat.equals(that.nameFormat)) {
return false;
}
-
+
if (simpleName == null && that.simpleName != null) {
return false;
} else if (simpleName != null && !simpleName.equals(that.simpleName)) {
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AttributeStatementBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AttributeStatementBean.java?rev=1720895&r1=1720894&r2=1720895&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AttributeStatementBean.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AttributeStatementBean.java Sat Dec 19 11:11:50 2015
@@ -36,7 +36,7 @@ public class AttributeStatementBean {
public AttributeStatementBean() {
attributeBeans = new ArrayList<AttributeBean>();
}
-
+
/**
* Constructor SamlAttributeStatement creates a new SamlAttributeStatement instance.
* @param subject A new SubjectBean instance
@@ -101,7 +101,7 @@ public class AttributeStatementBean {
} else if (attributeBeans != null && !attributeBeans.equals(that.attributeBeans)) {
return false;
}
-
+
if (subject == null && that.subject != null) {
return false;
} else if (subject != null && !subject.equals(that.subject)) {
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AudienceRestrictionBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AudienceRestrictionBean.java?rev=1720895&r1=1720894&r2=1720895&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AudienceRestrictionBean.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AudienceRestrictionBean.java Sat Dec 19 11:11:50 2015
@@ -46,7 +46,7 @@ public class AudienceRestrictionBean {
this.audienceURIs.addAll(audienceURIs);
}
}
-
+
/**
* Get the audienceURI instances
*
@@ -55,7 +55,7 @@ public class AudienceRestrictionBean {
public List<String> getAudienceURIs() {
return audienceURIs;
}
-
+
/**
* Set the audienceURI instance
*
@@ -65,7 +65,7 @@ public class AudienceRestrictionBean {
this.audienceURIs.clear();
this.audienceURIs.addAll(audienceURIs);
}
-
+
/**
* Method equals ...
*
@@ -84,9 +84,9 @@ public class AudienceRestrictionBean {
AudienceRestrictionBean that = (AudienceRestrictionBean) o;
if (!audienceURIs.equals(that.audienceURIs)) {
- return false;
+ return false;
}
-
+
return true;
}
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AuthDecisionStatementBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AuthDecisionStatementBean.java?rev=1720895&r1=1720894&r2=1720895&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AuthDecisionStatementBean.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AuthDecisionStatementBean.java Sat Dec 19 11:11:50 2015
@@ -29,33 +29,33 @@ import java.util.ArrayList;
*/
public class AuthDecisionStatementBean {
- /**
- * The SAML subject
+ /**
+ * The SAML subject
*/
private SubjectBean subject;
- /**
- * enum representing the possible decision types as specified in the SAML spec
+ /**
+ * enum representing the possible decision types as specified in the SAML spec
*/
public enum Decision {PERMIT, INDETERMINATE, DENY}
- /**
- * The decision rendered by the SAML authority with respect to the specified resource
+ /**
+ * The decision rendered by the SAML authority with respect to the specified resource
*/
private Decision decision;
- /**
- * A URI reference identifying the resource to which access authorization is sought
+ /**
+ * A URI reference identifying the resource to which access authorization is sought
*/
private String resource;
- /**
- * The set of actions authorized to be performed on the specified resource (one or more)
+ /**
+ * The set of actions authorized to be performed on the specified resource (one or more)
*/
private List<ActionBean> actionBeans;
- /**
- * A set of assertions that the SAML authority relied on in making the decision (optional)
+ /**
+ * A set of assertions that the SAML authority relied on in making the decision (optional)
*/
private Object evidence;
@@ -76,8 +76,8 @@ public class AuthDecisionStatementBean {
* @param actionBeans of type List<SamlAction>
*/
public AuthDecisionStatementBean(
- Decision decision,
- String resource,
+ Decision decision,
+ String resource,
SubjectBean subject,
Object evidence,
List<ActionBean> actionBeans
@@ -176,7 +176,7 @@ public class AuthDecisionStatementBean {
public void setSubject(SubjectBean subject) {
this.subject = subject;
}
-
+
@Override
public boolean equals(Object o) {
if (this == o) {
@@ -193,25 +193,25 @@ public class AuthDecisionStatementBean {
} else if (subject != null && !subject.equals(that.subject)) {
return false;
}
-
+
if (decision == null && that.decision != null) {
return false;
} else if (decision != null && !decision.equals(that.decision)) {
return false;
}
-
+
if (evidence == null && that.evidence != null) {
return false;
} else if (evidence != null && !evidence.equals(that.evidence)) {
return false;
}
-
+
if (actionBeans == null && that.actionBeans != null) {
return false;
} else if (actionBeans != null && !actionBeans.equals(that.actionBeans)) {
return false;
}
-
+
if (resource == null && that.resource != null) {
return false;
} else if (resource != null && !resource.equals(that.resource)) {
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AuthenticationStatementBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AuthenticationStatementBean.java?rev=1720895&r1=1720894&r2=1720895&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AuthenticationStatementBean.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AuthenticationStatementBean.java Sat Dec 19 11:11:50 2015
@@ -42,14 +42,14 @@ public class AuthenticationStatementBean
/**
* Construct a new AuthenticationStatementBean
- *
- * @param subject the Subject to set
+ *
+ * @param subject the Subject to set
* @param authenticationMethod the Authentication Method to set
* @param authenticationInstant the Authentication Instant to set
* @param sessionNotOnOrAfter the Session NotOnOrAfter time to set
*/
public AuthenticationStatementBean(
- SubjectBean subject,
+ SubjectBean subject,
String authenticationMethod,
DateTime authenticationInstant,
DateTime sessionNotOnOrAfter
@@ -107,7 +107,7 @@ public class AuthenticationStatementBean
public void setAuthenticationInstant(DateTime authenticationInstant) {
this.authenticationInstant = authenticationInstant;
}
-
+
/**
* Get the sessionNotOnOrAfter
* @return the sessionNotOnOrAfter
@@ -123,10 +123,10 @@ public class AuthenticationStatementBean
public void setSessionNotOnOrAfter(DateTime sessionNotOnOrAfter) {
this.sessionNotOnOrAfter = sessionNotOnOrAfter;
}
-
+
/**
* Get Subject Locality.
- *
+ *
* @return the subjectLocality
*/
public final SubjectLocalityBean getSubjectLocality() {
@@ -135,16 +135,16 @@ public class AuthenticationStatementBean
/**
* Set Subject Locality.
- *
+ *
* @param subjectLocality the subjectLocality to set
*/
public final void setSubjectLocality(final SubjectLocalityBean subjectLocality) {
this.subjectLocality = subjectLocality;
}
-
+
/**
* Get the session index.
- *
+ *
* @return the sessionIndex
*/
public final String getSessionIndex() {
@@ -153,7 +153,7 @@ public class AuthenticationStatementBean
/**
* Set the session index.
- *
+ *
* @param sessionIndex the sessionIndex to set
*/
public final void setSessionIndex(final String sessionIndex) {
@@ -173,32 +173,32 @@ public class AuthenticationStatementBean
if (authenticationInstant == null && that.authenticationInstant != null) {
return false;
- } else if (authenticationInstant != null
+ } else if (authenticationInstant != null
&& !authenticationInstant.equals(that.authenticationInstant)) {
return false;
}
-
+
if (sessionNotOnOrAfter == null && that.sessionNotOnOrAfter != null) {
return false;
- } else if (sessionNotOnOrAfter != null
+ } else if (sessionNotOnOrAfter != null
&& !sessionNotOnOrAfter.equals(that.sessionNotOnOrAfter)) {
return false;
}
-
+
if (authenticationMethod == null && that.authenticationMethod != null) {
return false;
- } else if (authenticationMethod != null
+ } else if (authenticationMethod != null
&& !authenticationMethod.equals(that.authenticationMethod)) {
return false;
}
-
+
if (subject == null && that.subject != null) {
return false;
- } else if (subject != null
+ } else if (subject != null
&& !subject.equals(that.subject)) {
return false;
}
-
+
if (subjectLocality == null && that.subjectLocality != null) {
return false;
} else if (subjectLocality != null && !subjectLocality.equals(that.subjectLocality)) {
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/ConditionsBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/ConditionsBean.java?rev=1720895&r1=1720894&r2=1720895&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/ConditionsBean.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/ConditionsBean.java Sat Dec 19 11:11:50 2015
@@ -50,13 +50,13 @@ public class ConditionsBean {
* @param notAfter The notAfter instance
*/
public ConditionsBean(
- DateTime notBefore,
+ DateTime notBefore,
DateTime notAfter
) {
this.notBefore = notBefore;
this.notAfter = notAfter;
}
-
+
/**
* Constructor ConditionsBean creates a new ConditionsBean instance.
*
@@ -67,7 +67,7 @@ public class ConditionsBean {
) {
this.tokenPeriodSeconds = tokenPeriodMinutes * 60;
}
-
+
/**
* Get the notBefore instance
*
@@ -85,7 +85,7 @@ public class ConditionsBean {
public void setNotBefore(DateTime notBefore) {
this.notBefore = notBefore;
}
-
+
/**
* Get the notAfter instance
*
@@ -103,7 +103,7 @@ public class ConditionsBean {
public void setNotAfter(DateTime notAfter) {
this.notAfter = notAfter;
}
-
+
/**
* Get the tokenPeriodMinutes of this object.
*
@@ -121,7 +121,7 @@ public class ConditionsBean {
public void setTokenPeriodMinutes(int tokenPeriodMinutes) {
this.tokenPeriodSeconds = tokenPeriodMinutes * 60;
}
-
+
/**
* Get the tokenPeriodSeconds of this object.
*
@@ -139,7 +139,7 @@ public class ConditionsBean {
public void setTokenPeriodSeconds(long tokenPeriodSeconds) {
this.tokenPeriodSeconds = tokenPeriodSeconds;
}
-
+
/**
* Get the audienceRestrictions instances
*
@@ -173,7 +173,7 @@ public class ConditionsBean {
public void setOneTimeUse(boolean oneTimeUse) {
this.oneTimeUse = oneTimeUse;
}
-
+
public ProxyRestrictionBean getProxyRestriction() {
return proxyRestriction;
}
@@ -181,7 +181,7 @@ public class ConditionsBean {
public void setProxyRestriction(ProxyRestrictionBean proxyRestriction) {
this.proxyRestriction = proxyRestriction;
}
-
+
public List<DelegateBean> getDelegates() {
return delegates;
}
@@ -189,7 +189,7 @@ public class ConditionsBean {
public void setDelegates(List<DelegateBean> delegates) {
this.delegates = delegates;
}
-
+
/**
* Method equals ...
*
@@ -210,41 +210,41 @@ public class ConditionsBean {
if (tokenPeriodSeconds != that.tokenPeriodSeconds) {
return false;
}
-
+
if (notBefore == null && that.notBefore != null) {
return false;
} else if (notBefore != null && !notBefore.equals(that.notBefore)) {
return false;
}
-
+
if (notAfter == null && that.notAfter != null) {
return false;
} else if (notAfter != null && !notAfter.equals(that.notAfter)) {
- return false;
+ return false;
}
-
+
if (audienceRestrictions == null && that.audienceRestrictions != null) {
return false;
- } else if (audienceRestrictions != null
+ } else if (audienceRestrictions != null
&& !audienceRestrictions.equals(that.audienceRestrictions)) {
- return false;
+ return false;
}
-
+
if (oneTimeUse != that.oneTimeUse) {
return false;
}
-
+
if (proxyRestriction == null && that.proxyRestriction != null) {
return false;
- } else if (proxyRestriction != null
+ } else if (proxyRestriction != null
&& !proxyRestriction.equals(that.proxyRestriction)) {
- return false;
+ return false;
}
-
+
if (delegates == null && that.delegates != null) {
return false;
} else if (delegates != null && !delegates.equals(that.delegates)) {
- return false;
+ return false;
}
return true;
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/DelegateBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/DelegateBean.java?rev=1720895&r1=1720894&r2=1720895&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/DelegateBean.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/DelegateBean.java Sat Dec 19 11:11:50 2015
@@ -24,7 +24,7 @@ import org.joda.time.DateTime;
/**
* Class DelegateBean represents a SAML 2.0 Delegate object. Only NameIDs are supported for now, not
* BaseID or EncryptedIDs.
- *
+ *
* See:
* http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-delegation-cs-01.pdf
*/
@@ -48,7 +48,7 @@ public class DelegateBean {
public void setConfirmationMethod(String confirmationMethod) {
this.confirmationMethod = confirmationMethod;
}
-
+
public NameIDBean getNameIDBean() {
return nameIDBean;
}
@@ -56,7 +56,7 @@ public class DelegateBean {
public void setNameIDBean(NameIDBean nameIDBean) {
this.nameIDBean = nameIDBean;
}
-
+
/**
* Method equals ...
*
@@ -79,19 +79,19 @@ public class DelegateBean {
} else if (delegationInstant != null && !delegationInstant.equals(that.delegationInstant)) {
return false;
}
-
+
if (confirmationMethod == null && that.confirmationMethod != null) {
return false;
} else if (confirmationMethod != null && !confirmationMethod.equals(that.confirmationMethod)) {
return false;
}
-
+
if (nameIDBean == null && that.nameIDBean != null) {
return false;
} else if (nameIDBean != null && !nameIDBean.equals(that.nameIDBean)) {
return false;
}
-
+
return true;
}
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/KeyInfoBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/KeyInfoBean.java?rev=1720895&r1=1720894&r2=1720895&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/KeyInfoBean.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/KeyInfoBean.java Sat Dec 19 11:11:50 2015
@@ -29,11 +29,11 @@ import org.w3c.dom.Element;
* Class KeyInfoBean represents a KeyInfo structure that will be embedded in a SAML Subject.
*/
public class KeyInfoBean {
-
+
public enum CERT_IDENTIFIER {
X509_CERT, X509_ISSUER_SERIAL, KEY_VALUE
}
-
+
private X509Certificate cert;
private CERT_IDENTIFIER certIdentifier = CERT_IDENTIFIER.X509_CERT;
private PublicKey publicKey;
@@ -63,7 +63,7 @@ public class KeyInfoBean {
public void setCertificate(X509Certificate cert) {
this.cert = cert;
}
-
+
/**
* Method getPublicKey returns the public key of this KeyInfoBean object.
*
@@ -81,7 +81,7 @@ public class KeyInfoBean {
public void setPublicKey(PublicKey publicKey) {
this.publicKey = publicKey;
}
-
+
/**
* Method getCertIdentifer returns the cert identifer of this KeyInfoBean object.
*
@@ -125,7 +125,7 @@ public class KeyInfoBean {
public void setElement(Element keyInfoElement) {
this.keyInfoElement = keyInfoElement;
}
-
+
/**
* Method equals ...
*
@@ -151,13 +151,13 @@ public class KeyInfoBean {
} else if (cert != null && !cert.equals(that.cert)) {
return false;
}
-
+
if (publicKey == null && that.publicKey != null) {
return false;
} else if (publicKey != null && !publicKey.equals(that.publicKey)) {
return false;
}
-
+
if (keyInfoElement == null && that.keyInfoElement != null) {
return false;
} else if (keyInfoElement != null && !keyInfoElement.equals(that.keyInfoElement)) {
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/NameIDBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/NameIDBean.java?rev=1720895&r1=1720894&r2=1720895&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/NameIDBean.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/NameIDBean.java Sat Dec 19 11:11:50 2015
@@ -40,7 +40,7 @@ public class NameIDBean {
* @param nameQualifier of type String
*/
public NameIDBean(
- String nameValue,
+ String nameValue,
String nameQualifier,
String nameIDFormat
) {
@@ -48,7 +48,7 @@ public class NameIDBean {
this.setNameQualifier(nameQualifier);
this.setNameIDFormat(nameIDFormat);
}
-
+
public String getNameValue() {
return nameValue;
}
@@ -72,7 +72,7 @@ public class NameIDBean {
public void setNameQualifier(String nameQualifier) {
this.nameQualifier = nameQualifier;
}
-
+
/**
* Method equals ...
*
@@ -95,19 +95,19 @@ public class NameIDBean {
} else if (nameValue != null && !nameValue.equals(that.nameValue)) {
return false;
}
-
+
if (nameIDFormat == null && that.nameIDFormat != null) {
return false;
} else if (nameIDFormat != null && !nameIDFormat.equals(that.nameIDFormat)) {
return false;
}
-
+
if (nameQualifier == null && that.nameQualifier != null) {
return false;
} else if (nameQualifier != null && !nameQualifier.equals(that.nameQualifier)) {
return false;
}
-
+
return true;
}
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/ProxyRestrictionBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/ProxyRestrictionBean.java?rev=1720895&r1=1720894&r2=1720895&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/ProxyRestrictionBean.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/ProxyRestrictionBean.java Sat Dec 19 11:11:50 2015
@@ -50,7 +50,7 @@ public class ProxyRestrictionBean {
this.audienceURIs.addAll(audienceURIs);
}
}
-
+
/**
* Get the audienceURI instances
*
@@ -88,11 +88,11 @@ public class ProxyRestrictionBean {
if (count != that.count) {
return false;
}
-
+
if (!audienceURIs.equals(that.audienceURIs)) {
- return false;
+ return false;
}
-
+
return true;
}
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java?rev=1720895&r1=1720894&r2=1720895&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java Sat Dec 19 11:11:50 2015
@@ -43,15 +43,15 @@ public class SubjectBean {
* @param subjectConfirmationMethod of type String
*/
public SubjectBean(
- String subjectName,
- String subjectNameQualifier,
+ String subjectName,
+ String subjectNameQualifier,
String subjectConfirmationMethod
) {
nameID.setNameValue(subjectName);
nameID.setNameQualifier(subjectNameQualifier);
this.subjectConfirmationMethod = subjectConfirmationMethod;
}
-
+
/**
* Constructor SubjectBean creates a new SubjectBean instance.
*
@@ -61,8 +61,8 @@ public class SubjectBean {
* @param subjectNameIDFormat of type String
*/
public SubjectBean(
- String subjectName,
- String subjectNameQualifier,
+ String subjectName,
+ String subjectNameQualifier,
String subjectConfirmationMethod,
String subjectNameIDFormat
) {
@@ -87,7 +87,7 @@ public class SubjectBean {
public void setSubjectName(String subjectName) {
nameID.setNameValue(subjectName);
}
-
+
/**
* Method getSubjectNameQualifier returns the subjectNameQualifier of this SubjectBean object.
*
@@ -105,7 +105,7 @@ public class SubjectBean {
public void setSubjectNameQualifier(String subjectNameQualifier) {
nameID.setNameQualifier(subjectNameQualifier);
}
-
+
/**
* Method getSubjectConfirmationMethod returns the subjectConfirmationMethod of
* this SubjectBean object.
@@ -120,15 +120,15 @@ public class SubjectBean {
* Method setSubjectConfirmationMethod sets the subjectConfirmationMethod of
* this SubjectBean object.
*
- * @param subjectConfirmationMethod the subjectConfirmationMethod of this
+ * @param subjectConfirmationMethod the subjectConfirmationMethod of this
* SubjectBean object.
*/
public void setSubjectConfirmationMethod(String subjectConfirmationMethod) {
this.subjectConfirmationMethod = subjectConfirmationMethod;
}
-
+
/**
- * Method getSubjectNameIDFormat returns the subjectNameIDFormat of this SubjectBean
+ * Method getSubjectNameIDFormat returns the subjectNameIDFormat of this SubjectBean
* object.
*
* @return the subjectNameIDFormat (type String) of this SubjectBean object.
@@ -138,7 +138,7 @@ public class SubjectBean {
}
/**
- * Method setSubjectNameIDFormat sets the subjectNameIDFormat of this SubjectBean
+ * Method setSubjectNameIDFormat sets the subjectNameIDFormat of this SubjectBean
* object.
*
* @param subjectNameIDFormat the subjectNameIDFormat of this SubjectBean object.
@@ -146,7 +146,7 @@ public class SubjectBean {
public void setSubjectNameIDFormat(String subjectNameIDFormat) {
nameID.setNameIDFormat(subjectNameIDFormat);
}
-
+
/**
* Method getKeyInfo returns the keyInfo of this SubjectBean object.
*
@@ -164,7 +164,7 @@ public class SubjectBean {
public void setKeyInfo(KeyInfoBean keyInfo) {
this.keyInfo = keyInfo;
}
-
+
/**
* Set the SubjectConfirmationData of this SubjectBean object
* @return the SubjectConfirmationData of this SubjectBean object
@@ -182,7 +182,7 @@ public class SubjectBean {
) {
this.subjectConfirmationData = subjectConfirmationData;
}
-
+
/**
* Method equals ...
*
@@ -203,23 +203,23 @@ public class SubjectBean {
if (!nameID.equals(that.nameID)) {
return false;
}
-
+
if (subjectConfirmationMethod == null && that.subjectConfirmationMethod != null) {
return false;
- } else if (subjectConfirmationMethod != null &&
+ } else if (subjectConfirmationMethod != null &&
!subjectConfirmationMethod.equals(that.subjectConfirmationMethod)) {
return false;
}
-
+
if (keyInfo == null && that.keyInfo != null) {
return false;
} else if (keyInfo != null && !keyInfo.equals(that.keyInfo)) {
return false;
}
-
+
if (subjectConfirmationData == null && that.subjectConfirmationData != null) {
return false;
- } else if (subjectConfirmationData != null
+ } else if (subjectConfirmationData != null
&& !subjectConfirmationData.equals(that.subjectConfirmationData)) {
return false;
}
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectConfirmationDataBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectConfirmationDataBean.java?rev=1720895&r1=1720894&r2=1720895&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectConfirmationDataBean.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectConfirmationDataBean.java Sat Dec 19 11:11:50 2015
@@ -117,7 +117,7 @@ public class SubjectConfirmationDataBean
public void setNotAfter(DateTime notAfter) {
this.notAfter = notAfter;
}
-
+
/**
* Method equals ...
*
@@ -140,25 +140,25 @@ public class SubjectConfirmationDataBean
} else if (recipient != null && !recipient.equals(that.recipient)) {
return false;
}
-
+
if (address == null && that.address != null) {
return false;
} else if (address != null && !address.equals(that.address)) {
return false;
}
-
+
if (inResponseTo == null && that.inResponseTo != null) {
return false;
} else if (inResponseTo != null && !inResponseTo.equals(that.inResponseTo)) {
return false;
}
-
+
if (notBefore == null && that.notBefore != null) {
return false;
} else if (notBefore != null && !notBefore.equals(that.notBefore)) {
return false;
}
-
+
if (notAfter == null && that.notAfter != null) {
return false;
} else if (notAfter != null && !notAfter.equals(that.notAfter)) {
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectLocalityBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectLocalityBean.java?rev=1720895&r1=1720894&r2=1720895&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectLocalityBean.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectLocalityBean.java Sat Dec 19 11:11:50 2015
@@ -40,7 +40,7 @@ public class SubjectLocalityBean {
/**
* Constructor for creating a SubjectLocalityBean with ip and dns addresses.
- *
+ *
* @param ipAddress ip address
* @param dnsAddress dns address
*/
@@ -51,7 +51,7 @@ public class SubjectLocalityBean {
/**
* Get the ip address.
- *
+ *
* @return the ipAddress
*/
public final String getIpAddress() {
@@ -60,7 +60,7 @@ public class SubjectLocalityBean {
/**
* Set the ip address.
- *
+ *
* @param ipAddress the ipAddress to set
*/
public final void setIpAddress(final String ipAddress) {
@@ -69,7 +69,7 @@ public class SubjectLocalityBean {
/**
* Get the dns address.
- *
+ *
* @return the dnsAddress
*/
public final String getDnsAddress() {
@@ -78,7 +78,7 @@ public class SubjectLocalityBean {
/**
* Set the dns address.
- *
+ *
* @param dnsAddress the dnsAddress to set
*/
public final void setDnsAddress(final String dnsAddress) {
@@ -87,7 +87,7 @@ public class SubjectLocalityBean {
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
@@ -119,7 +119,7 @@ public class SubjectLocalityBean {
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#hashCode()
*/
@Override
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/Version.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/Version.java?rev=1720895&r1=1720894&r2=1720895&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/Version.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/Version.java Sat Dec 19 11:11:50 2015
@@ -24,7 +24,7 @@ package org.apache.wss4j.common.saml.bea
* The SAML Version
*/
public enum Version {
-
+
SAML_20, SAML_11, SAML_10;
}