You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by gi...@apache.org on 2012/02/29 21:54:56 UTC
svn commit: r1295267 [7/11] - in /webservices/wss4j/branches/swssf:
rampart-policy/src/main/java/org/apache/ws/secpolicy/builders/
streaming-ws-policy/src/main/java/org/swssf/policy/
streaming-ws-policy/src/main/java/org/swssf/policy/assertionStates/ s...
Modified: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/SAMLAssertionWrapper.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/SAMLAssertionWrapper.java?rev=1295267&r1=1295266&r2=1295267&view=diff
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/SAMLAssertionWrapper.java (original)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/SAMLAssertionWrapper.java Wed Feb 29 20:54:51 2012
@@ -86,12 +86,12 @@ public class SAMLAssertionWrapper {
* Typed SAML v2.0 assertion
*/
private org.opensaml.saml2.core.Assertion saml2 = null;
-
+
/**
* The Assertion as a DOM element
*/
private Element assertionElement;
-
+
/**
* Default Canonicalization algorithm used for signing.
*/
@@ -115,7 +115,7 @@ public class SAMLAssertionWrapper {
*/
public SAMLAssertionWrapper(Element element) throws WSSecurityException {
OpenSAMLUtil.initSamlEngine();
-
+
parseElement(element);
}
@@ -125,7 +125,7 @@ public class SAMLAssertionWrapper {
* @param saml2 of type Assertion
*/
public SAMLAssertionWrapper(org.opensaml.saml2.core.Assertion saml2) throws XMLSecurityException {
- this((XMLObject)saml2);
+ this((XMLObject) saml2);
}
/**
@@ -134,9 +134,9 @@ public class SAMLAssertionWrapper {
* @param saml1 of type Assertion
*/
public SAMLAssertionWrapper(org.opensaml.saml1.core.Assertion saml1) throws XMLSecurityException {
- this((XMLObject)saml1);
+ this((XMLObject) saml1);
}
-
+
/**
* Constructor AssertionWrapper creates a new AssertionWrapper instance.
* This is the primary constructor. All other constructor calls should
@@ -147,7 +147,7 @@ public class SAMLAssertionWrapper {
*/
public SAMLAssertionWrapper(XMLObject xmlObject) {
OpenSAMLUtil.initSamlEngine();
-
+
this.xmlObject = xmlObject;
if (xmlObject instanceof org.opensaml.saml1.core.Assertion) {
this.saml1 = (org.opensaml.saml1.core.Assertion) xmlObject;
@@ -155,8 +155,8 @@ public class SAMLAssertionWrapper {
this.saml2 = (org.opensaml.saml2.core.Assertion) xmlObject;
} else {
logger.error(
- "AssertionWrapper: found unexpected type "
- + (xmlObject != null ? xmlObject.getClass().getName() : xmlObject)
+ "AssertionWrapper: found unexpected type "
+ + (xmlObject != null ? xmlObject.getClass().getName() : xmlObject)
);
}
}
@@ -164,7 +164,7 @@ public class SAMLAssertionWrapper {
public SAMLAssertionWrapper(SAMLCallback samlCallback) throws XMLSecurityException {
OpenSAMLUtil.initSamlEngine();
-
+
if (samlCallback.getAssertionElement() != null) {
parseElement(samlCallback.getAssertionElement());
} else {
@@ -236,7 +236,7 @@ public class SAMLAssertionWrapper {
);
return null;
}
-
+
/**
* Method setSignature sets the signature of this AssertionWrapper object.
*
@@ -255,36 +255,36 @@ public class SAMLAssertionWrapper {
/**
* Create an enveloped signature on the assertion that has been created.
- *
- * @param issuerKeyName the Issuer KeyName to use with the issuerCrypto argument
+ *
+ * @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
- * @param sendKeyValue whether to send the key value or not
+ * @param issuerCrypto the Issuer Crypto instance
+ * @param sendKeyValue whether to send the key value or not
* @throws WSSecurityException
*/
public void signAssertion(String issuerKeyName, String issuerKeyPassword,
- Crypto issuerCrypto, boolean sendKeyValue)
+ Crypto issuerCrypto, boolean sendKeyValue)
throws XMLSecurityException {
signAssertion(issuerKeyName, issuerKeyPassword, issuerCrypto,
sendKeyValue, defaultCanonicalizationAlgorithm,
defaultRSASignatureAlgorithm);
}
-
+
/**
* 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
- * @param sendKeyValue whether to send the key value or not
+ *
+ * @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
+ * @param sendKeyValue whether to send the key value or not
* @param canonicalizationAlgorithm the canonicalization algorithm to be used for signing
- * @param signatureAlgorithm the signature algorithm to be used for signing
+ * @param signatureAlgorithm the signature algorithm to be used for signing
* @throws WSSecurityException
*/
public void signAssertion(String issuerKeyName, String issuerKeyPassword,
- Crypto issuerCrypto, boolean sendKeyValue,
- String canonicalizationAlgorithm, String signatureAlgorithm)
+ Crypto issuerCrypto, boolean sendKeyValue,
+ String canonicalizationAlgorithm, String signatureAlgorithm)
throws XMLSecurityException {
//
// Create the signature
@@ -344,7 +344,7 @@ public class SAMLAssertionWrapper {
// add the signature to the assertion
setSignature(signature);
}
-
+
/**
* Verify the signature of this assertion
*
@@ -896,7 +896,7 @@ public class SAMLAssertionWrapper {
protected boolean validatePublicKey(PublicKey publicKey, Crypto crypto) throws XMLSecurityException {
return crypto.verifyTrust(publicKey);
}
-
+
/**
* Parse the DOM Element into Opensaml objects.
*/
@@ -908,22 +908,22 @@ public class SAMLAssertionWrapper {
this.saml2 = (org.opensaml.saml2.core.Assertion) xmlObject;
} else {
logger.error(
- "AssertionWrapper: found unexpected type "
- + (xmlObject != null ? xmlObject.getClass().getName() : xmlObject)
+ "AssertionWrapper: found unexpected type "
+ + (xmlObject != null ? xmlObject.getClass().getName() : xmlObject)
);
}
-
+
assertionElement = element;
}
-
+
/**
* Parse a SAMLCallback object to create a SAML Assertion
*/
private void parseCallback(
- SAMLCallback samlCallback
+ SAMLCallback samlCallback
) throws WSSecurityException, XMLSecurityException {
SAMLVersion samlVersion = samlCallback.getSamlVersion();
-
+
String issuer = samlCallback.getIssuer();
if (samlVersion.equals(SAMLVersion.VERSION_11)) {
// Build a SAML v1.1 assertion
@@ -931,33 +931,33 @@ public class SAMLAssertionWrapper {
try {
// Process the SAML authentication statement(s)
- List<AuthenticationStatement> authenticationStatements =
- SAML1ComponentBuilder.createSamlv1AuthenticationStatement(
- samlCallback.getAuthenticationStatementData()
- );
+ List<AuthenticationStatement> authenticationStatements =
+ SAML1ComponentBuilder.createSamlv1AuthenticationStatement(
+ samlCallback.getAuthenticationStatementData()
+ );
saml1.getAuthenticationStatements().addAll(authenticationStatements);
-
+
// Process the SAML attribute statement(s)
List<AttributeStatement> attributeStatements =
SAML1ComponentBuilder.createSamlv1AttributeStatement(
- samlCallback.getAttributeStatementData()
+ samlCallback.getAttributeStatementData()
);
saml1.getAttributeStatements().addAll(attributeStatements);
-
+
// Process the SAML authorization decision statement(s)
List<AuthorizationDecisionStatement> authDecisionStatements =
SAML1ComponentBuilder.createSamlv1AuthorizationDecisionStatement(
- samlCallback.getAuthDecisionStatementData()
+ samlCallback.getAuthDecisionStatementData()
);
saml1.getAuthorizationDecisionStatements().addAll(authDecisionStatements);
-
+
// Build the complete assertion
- org.opensaml.saml1.core.Conditions conditions =
- SAML1ComponentBuilder.createSamlv1Conditions(samlCallback.getConditions());
+ org.opensaml.saml1.core.Conditions conditions =
+ SAML1ComponentBuilder.createSamlv1Conditions(samlCallback.getConditions());
saml1.setConditions(conditions);
} catch (org.opensaml.xml.security.SecurityException ex) {
throw new WSSecurityException(
- "Error generating KeyInfo from signing credential", ex
+ "Error generating KeyInfo from signing credential", ex
);
}
@@ -970,41 +970,41 @@ public class SAMLAssertionWrapper {
Issuer samlIssuer = SAML2ComponentBuilder.createIssuer(issuer);
// Authn Statement(s)
- List<AuthnStatement> authnStatements =
- SAML2ComponentBuilder.createAuthnStatement(
- samlCallback.getAuthenticationStatementData()
- );
+ List<AuthnStatement> authnStatements =
+ SAML2ComponentBuilder.createAuthnStatement(
+ samlCallback.getAuthenticationStatementData()
+ );
saml2.getAuthnStatements().addAll(authnStatements);
// Attribute statement(s)
- List<org.opensaml.saml2.core.AttributeStatement> attributeStatements =
- SAML2ComponentBuilder.createAttributeStatement(
- samlCallback.getAttributeStatementData()
- );
+ List<org.opensaml.saml2.core.AttributeStatement> attributeStatements =
+ SAML2ComponentBuilder.createAttributeStatement(
+ samlCallback.getAttributeStatementData()
+ );
saml2.getAttributeStatements().addAll(attributeStatements);
// AuthzDecisionStatement(s)
List<AuthzDecisionStatement> authDecisionStatements =
SAML2ComponentBuilder.createAuthorizationDecisionStatement(
- samlCallback.getAuthDecisionStatementData()
+ samlCallback.getAuthDecisionStatementData()
);
saml2.getAuthzDecisionStatements().addAll(authDecisionStatements);
// Build the SAML v2.0 assertion
saml2.setIssuer(samlIssuer);
-
+
try {
- org.opensaml.saml2.core.Subject subject =
- SAML2ComponentBuilder.createSaml2Subject(samlCallback.getSubject());
+ org.opensaml.saml2.core.Subject subject =
+ SAML2ComponentBuilder.createSaml2Subject(samlCallback.getSubject());
saml2.setSubject(subject);
} catch (org.opensaml.xml.security.SecurityException ex) {
throw new WSSecurityException(
- "Error generating KeyInfo from signing credential", ex
+ "Error generating KeyInfo from signing credential", ex
);
}
-
- org.opensaml.saml2.core.Conditions conditions =
- SAML2ComponentBuilder.createConditions(samlCallback.getConditions());
+
+ org.opensaml.saml2.core.Conditions conditions =
+ SAML2ComponentBuilder.createConditions(samlCallback.getConditions());
saml2.setConditions(conditions);
// Set the OpenSaml2 XMLObject instance
Modified: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/SAMLCallback.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/SAMLCallback.java?rev=1295267&r1=1295266&r2=1295267&view=diff
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/SAMLCallback.java (original)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/SAMLCallback.java Wed Feb 29 20:54:51 2012
@@ -81,7 +81,7 @@ public class SAMLCallback implements Cal
* A list of <code>AuthDecisionStatementBean</code> values
*/
private List<AuthDecisionStatementBean> authDecisionStatementData;
-
+
/**
* A DOM Element representation of this SAML Assertion
*/
@@ -275,17 +275,19 @@ public class SAMLCallback implements Cal
public SAMLVersion getSamlVersion() {
return samlVersion;
}
-
+
/**
* Set the DOM representation of this SAML Assertion
+ *
* @param assertionElement the DOM representation of this SAML Assertion
*/
public void setAssertionElement(Element assertionElement) {
this.assertionElement = assertionElement;
}
-
+
/**
* Get the DOM representation of this SAML Assertion
+ *
* @return the DOM representation of this SAML Assertion
*/
public Element getAssertionElement() {
Modified: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/ActionBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/ActionBean.java?rev=1295267&r1=1295266&r2=1295267&view=diff
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/ActionBean.java (original)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/ActionBean.java Wed Feb 29 20:54:51 2012
@@ -23,20 +23,20 @@ package org.swssf.wss.impl.saml.bean;
/**
* Class SamlAction represents the raw data required by the <code>AssertionWrapper</code> when
* creating the <code>Action</code> element of the SAML Authorization Decision Statement.
- *
+ * <p/>
* Created on May 19, 2009
*/
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;
@@ -50,7 +50,7 @@ public class ActionBean {
* Constructor SamlAction creates a new SamlAction instance.
*
* @param actionNamespace of type String
- * @param contents of type String
+ * @param contents of type String
*/
public ActionBean(String actionNamespace, String contents) {
this.actionNamespace = actionNamespace;
@@ -92,7 +92,7 @@ public class ActionBean {
public void setContents(String contents) {
this.contents = contents;
}
-
+
@Override
public boolean equals(Object o) {
if (this == o) return true;
@@ -105,7 +105,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/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/AttributeBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/AttributeBean.java?rev=1295267&r1=1295266&r2=1295267&view=diff
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/AttributeBean.java (original)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/AttributeBean.java Wed Feb 29 20:54:51 2012
@@ -19,8 +19,8 @@
package org.swssf.wss.impl.saml.bean;
-import java.util.List;
import java.util.ArrayList;
+import java.util.List;
/**
* Class SamlAttribute represents an instance of a SAML attribute.
@@ -43,9 +43,9 @@ public class AttributeBean {
/**
* Constructor SamlAttribute creates a new SamlAttribute instance.
- *
- * @param simpleName of type String
- * @param qualifiedName of type String
+ *
+ * @param simpleName of type String
+ * @param qualifiedName of type String
* @param attributeValues of type List<String>
*/
public AttributeBean(String simpleName, String qualifiedName, List<String> attributeValues) {
@@ -71,16 +71,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.
*
@@ -125,7 +125,7 @@ public class AttributeBean {
public void setAttributeValues(List<String> attributeValues) {
this.attributeValues = attributeValues;
}
-
+
/**
* Method setCustomAttributeValues sets the attributeValues of this SamlAttribute object.
* This method allows the user to specify OpenSAML XMLObject attributes.
@@ -135,7 +135,7 @@ public class AttributeBean {
public void setCustomAttributeValues(List<?> customAttributeValues) {
this.customAttributeValues = customAttributeValues;
}
-
+
/**
* Method getCustomAttributeValues returns the attributeValues of this SamlAttribute object.
*
@@ -157,26 +157,26 @@ public class AttributeBean {
} else if (attributeValues != null && !attributeValues.equals(that.attributeValues)) {
return false;
}
-
+
if (customAttributeValues == null && that.customAttributeValues != null) {
return false;
- } else if (customAttributeValues != null
+ } else if (customAttributeValues != null
&& !customAttributeValues.equals(that.customAttributeValues)) {
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/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/AttributeStatementBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/AttributeStatementBean.java?rev=1295267&r1=1295266&r2=1295267&view=diff
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/AttributeStatementBean.java (original)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/AttributeStatementBean.java Wed Feb 29 20:54:51 2012
@@ -19,13 +19,13 @@
package org.swssf.wss.impl.saml.bean;
-import java.util.List;
import java.util.ArrayList;
+import java.util.List;
/**
* Class SamlAttributeStatement represents a SAML attribute statement
- *
+ * <p/>
* Created on May 20, 2009
*/
public class AttributeStatementBean {
@@ -38,15 +38,16 @@ public class AttributeStatementBean {
public AttributeStatementBean() {
attributeBeans = new ArrayList<AttributeBean>();
}
-
+
/**
* Constructor SamlAttributeStatement creates a new SamlAttributeStatement instance.
- * @param subject A new SubjectBean instance
+ *
+ * @param subject A new SubjectBean instance
* @param attributeBeans A list of Attributes
*/
public AttributeStatementBean(
- SubjectBean subject,
- List<AttributeBean> attributeBeans
+ SubjectBean subject,
+ List<AttributeBean> attributeBeans
) {
this.subject = subject;
this.attributeBeans = attributeBeans;
@@ -65,7 +66,6 @@ public class AttributeStatementBean {
* Method setSamlAttributes sets the samlAttributes of this SamlAttributeStatement object.
*
* @param attributeBeans the samlAttributes of this SamlAttributeStatement object.
- *
*/
public void setSamlAttributes(List<AttributeBean> attributeBeans) {
this.attributeBeans = attributeBeans;
@@ -73,6 +73,7 @@ public class AttributeStatementBean {
/**
* Get the Subject
+ *
* @return the Subject
*/
public SubjectBean getSubject() {
@@ -81,6 +82,7 @@ public class AttributeStatementBean {
/**
* Set the Subject
+ *
* @param subject the SubjectBean instance to set
*/
public void setSubject(SubjectBean subject) {
@@ -99,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/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/AuthDecisionStatementBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/AuthDecisionStatementBean.java?rev=1295267&r1=1295266&r2=1295267&view=diff
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/AuthDecisionStatementBean.java (original)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/AuthDecisionStatementBean.java Wed Feb 29 20:54:51 2012
@@ -19,45 +19,47 @@
package org.swssf.wss.impl.saml.bean;
-import java.util.List;
import java.util.ArrayList;
+import java.util.List;
/**
* Class SamlDecision represents the raw data to be used by the <code>AssertionWrapper</code> when
* creating SAML Authorization Decision Statements.
- *
+ * <p/>
* Created on May 19, 2009
*/
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}
+ 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;
@@ -71,18 +73,18 @@ public class AuthDecisionStatementBean {
/**
* Constructor SamlDecision creates a new SamlDecision instance.
*
- * @param decision of type Decision
- * @param resource of type String
- * @param subject of type SubjectBean
- * @param evidence of type Object
+ * @param decision of type Decision
+ * @param resource of type String
+ * @param subject of type SubjectBean
+ * @param evidence of type Object
* @param actionBeans of type List<SamlAction>
*/
public AuthDecisionStatementBean(
- Decision decision,
- String resource,
- SubjectBean subject,
- Object evidence,
- List<ActionBean> actionBeans
+ Decision decision,
+ String resource,
+ SubjectBean subject,
+ Object evidence,
+ List<ActionBean> actionBeans
) {
this.decision = decision;
this.resource = resource;
@@ -165,6 +167,7 @@ public class AuthDecisionStatementBean {
/**
* Get the Subject
+ *
* @return the Subject
*/
public SubjectBean getSubject() {
@@ -173,12 +176,13 @@ public class AuthDecisionStatementBean {
/**
* Set the Subject
+ *
* @param subject the SubjectBean instance to set
*/
public void setSubject(SubjectBean subject) {
this.subject = subject;
}
-
+
@Override
public boolean equals(Object o) {
if (this == o) return true;
@@ -191,25 +195,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/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/AuthenticationStatementBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/AuthenticationStatementBean.java?rev=1295267&r1=1295266&r2=1295267&view=diff
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/AuthenticationStatementBean.java (original)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/AuthenticationStatementBean.java Wed Feb 29 20:54:51 2012
@@ -25,7 +25,7 @@ import org.joda.time.DateTime;
/**
* Class AuthenticationStatementBean represents the raw data required to create
* a SAML v1.1 or v2.0 authentication statement.
- *
+ * <p/>
* Created on May 20, 2009
*/
public class AuthenticationStatementBean {
@@ -43,15 +43,15 @@ public class AuthenticationStatementBean
/**
* Construct a new AuthenticationStatementBean
- *
- * @param subject the Subject to set
- * @param authenticationMethod the Authentication Method to set
+ *
+ * @param subject the Subject to set
+ * @param authenticationMethod the Authentication Method to set
* @param authenticationInstant the Authentication Instant to set
*/
public AuthenticationStatementBean(
- SubjectBean subject,
- String authenticationMethod,
- DateTime authenticationInstant
+ SubjectBean subject,
+ String authenticationMethod,
+ DateTime authenticationInstant
) {
this.subject = subject;
this.authenticationMethod = authenticationMethod;
@@ -60,6 +60,7 @@ public class AuthenticationStatementBean
/**
* Get the Subject
+ *
* @return the subject
*/
public SubjectBean getSubject() {
@@ -68,6 +69,7 @@ public class AuthenticationStatementBean
/**
* Set the subject
+ *
* @param subject the SubjectBean instance to set
*/
public void setSubject(SubjectBean subject) {
@@ -76,6 +78,7 @@ public class AuthenticationStatementBean
/**
* Get the authentication method
+ *
* @return the authentication method
*/
public String getAuthenticationMethod() {
@@ -84,6 +87,7 @@ public class AuthenticationStatementBean
/**
* Set the authentication method
+ *
* @param authenticationMethod the authentication method
*/
public void setAuthenticationMethod(String authenticationMethod) {
@@ -92,6 +96,7 @@ public class AuthenticationStatementBean
/**
* Get the authentication instant
+ *
* @return the authentication instant
*/
public DateTime getAuthenticationInstant() {
@@ -100,15 +105,16 @@ public class AuthenticationStatementBean
/**
* Set the authentication instant
+ *
* @param authenticationInstant the authentication instant
*/
public void setAuthenticationInstant(DateTime authenticationInstant) {
this.authenticationInstant = authenticationInstant;
}
-
+
/**
* Get Subject Locality.
- *
+ *
* @return the subjectLocality
*/
public final SubjectLocalityBean getSubjectLocality() {
@@ -117,16 +123,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() {
@@ -135,7 +141,7 @@ public class AuthenticationStatementBean
/**
* Set the session index.
- *
+ *
* @param sessionIndex the sessionIndex to set
*/
public final void setSessionIndex(final String sessionIndex) {
@@ -151,25 +157,25 @@ public class AuthenticationStatementBean
if (authenticationInstant == null && that.authenticationInstant != null) {
return false;
- } else if (authenticationInstant != null
- && !authenticationInstant.equals(that.authenticationInstant)) {
+ } else if (authenticationInstant != null
+ && !authenticationInstant.equals(that.authenticationInstant)) {
return false;
}
-
+
if (authenticationMethod == null && that.authenticationMethod != null) {
return false;
- } else if (authenticationMethod != null
- && !authenticationMethod.equals(that.authenticationMethod)) {
+ } else if (authenticationMethod != null
+ && !authenticationMethod.equals(that.authenticationMethod)) {
return false;
}
-
+
if (subject == null && that.subject != null) {
return false;
- } else if (subject != null
- && !subject.equals(that.subject)) {
+ } 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/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/ConditionsBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/ConditionsBean.java?rev=1295267&r1=1295266&r2=1295267&view=diff
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/ConditionsBean.java (original)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/ConditionsBean.java Wed Feb 29 20:54:51 2012
@@ -25,7 +25,7 @@ import org.joda.time.DateTime;
/**
* Class ConditionsBean represents a SAML Conditions object (can be used to create
* both SAML v1.1 and v2.0 statements)
- *
+ * <p/>
* Created on May 20, 2009
*/
public class ConditionsBean {
@@ -44,27 +44,27 @@ public class ConditionsBean {
* Constructor ConditionsBean creates a new ConditionsBean instance.
*
* @param notBefore The notBefore instance
- * @param notAfter The notAfter instance
+ * @param notAfter The notAfter instance
*/
public ConditionsBean(
- DateTime notBefore,
- DateTime notAfter
+ DateTime notBefore,
+ DateTime notAfter
) {
this.notBefore = notBefore;
this.notAfter = notAfter;
}
-
+
/**
* Constructor ConditionsBean creates a new ConditionsBean instance.
*
* @param tokenPeriodMinutes how long the token is valid for in minutes
*/
public ConditionsBean(
- int tokenPeriodMinutes
+ int tokenPeriodMinutes
) {
this.tokenPeriodMinutes = tokenPeriodMinutes;
}
-
+
/**
* Get the notBefore instance
*
@@ -82,7 +82,7 @@ public class ConditionsBean {
public void setNotBefore(DateTime notBefore) {
this.notBefore = notBefore;
}
-
+
/**
* Get the notAfter instance
*
@@ -100,7 +100,7 @@ public class ConditionsBean {
public void setNotAfter(DateTime notAfter) {
this.notAfter = notAfter;
}
-
+
/**
* Get the tokenPeriodMinutes of this object.
*
@@ -118,7 +118,7 @@ public class ConditionsBean {
public void setTokenPeriodMinutes(int tokenPeriodMinutes) {
this.tokenPeriodMinutes = tokenPeriodMinutes;
}
-
+
/**
* Get the audienceURI instance
*
@@ -151,23 +151,23 @@ public class ConditionsBean {
ConditionsBean that = (ConditionsBean) o;
if (tokenPeriodMinutes != that.tokenPeriodMinutes) 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 (audienceURI == null && that.audienceURI != null) {
return false;
} else if (audienceURI != null && !audienceURI.equals(that.audienceURI)) {
- return false;
+ return false;
}
return true;
Modified: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/KeyInfoBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/KeyInfoBean.java?rev=1295267&r1=1295266&r2=1295267&view=diff
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/KeyInfoBean.java (original)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/KeyInfoBean.java Wed Feb 29 20:54:51 2012
@@ -19,21 +19,21 @@
package org.swssf.wss.impl.saml.bean;
+import org.w3c.dom.Element;
+
import java.security.PublicKey;
import java.security.cert.X509Certificate;
-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;
@@ -62,7 +62,7 @@ public class KeyInfoBean {
public void setCertificate(X509Certificate cert) {
this.cert = cert;
}
-
+
/**
* Method getPublicKey returns the public key of this KeyInfoBean object.
*
@@ -80,7 +80,7 @@ public class KeyInfoBean {
public void setPublicKey(PublicKey publicKey) {
this.publicKey = publicKey;
}
-
+
/**
* Method getCertIdentifer returns the cert identifer of this KeyInfoBean object.
*
@@ -98,7 +98,7 @@ public class KeyInfoBean {
public void setCertIdentifer(CERT_IDENTIFIER certIdentifier) {
this.certIdentifier = certIdentifier;
}
-
+
/**
* Method getElement returns the DOM Element of this KeyInfoBean object.
*
@@ -116,7 +116,7 @@ public class KeyInfoBean {
public void setElement(Element keyInfoElement) {
this.keyInfoElement = keyInfoElement;
}
-
+
/**
* Method equals ...
*
@@ -136,13 +136,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/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/SubjectBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/SubjectBean.java?rev=1295267&r1=1295266&r2=1295267&view=diff
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/SubjectBean.java (original)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/SubjectBean.java Wed Feb 29 20:54:51 2012
@@ -24,7 +24,7 @@ import org.swssf.wss.impl.saml.builder.S
/**
* Class SubjectBean represents a SAML subject (can be used to create
* both SAML v1.1 and v2.0 statements)
- *
+ * <p/>
* Created on May 20, 2009
*/
public class SubjectBean {
@@ -43,33 +43,33 @@ public class SubjectBean {
/**
* Constructor SubjectBean creates a new SubjectBean instance.
*
- * @param subjectName of type String
- * @param subjectNameQualifier of type String
+ * @param subjectName of type String
+ * @param subjectNameQualifier of type String
* @param subjectConfirmationMethod of type String
*/
public SubjectBean(
- String subjectName,
- String subjectNameQualifier,
- String subjectConfirmationMethod
+ String subjectName,
+ String subjectNameQualifier,
+ String subjectConfirmationMethod
) {
this.subjectName = subjectName;
this.subjectNameQualifier = subjectNameQualifier;
this.subjectConfirmationMethod = subjectConfirmationMethod;
}
-
+
/**
* Constructor SubjectBean creates a new SubjectBean instance.
*
- * @param subjectName of type String
- * @param subjectNameQualifier of type String
+ * @param subjectName of type String
+ * @param subjectNameQualifier of type String
* @param subjectConfirmationMethod of type String
- * @param subjectNameIDFormat of type String
+ * @param subjectNameIDFormat of type String
*/
public SubjectBean(
- String subjectName,
- String subjectNameQualifier,
- String subjectConfirmationMethod,
- String subjectNameIDFormat
+ String subjectName,
+ String subjectNameQualifier,
+ String subjectConfirmationMethod,
+ String subjectNameIDFormat
) {
this(subjectName, subjectNameQualifier, subjectConfirmationMethod);
this.subjectNameIDFormat = subjectNameIDFormat;
@@ -92,7 +92,7 @@ public class SubjectBean {
public void setSubjectName(String subjectName) {
this.subjectName = subjectName;
}
-
+
/**
* Method getSubjectNameQualifier returns the subjectNameQualifier of this SubjectBean object.
*
@@ -110,7 +110,7 @@ public class SubjectBean {
public void setSubjectNameQualifier(String subjectNameQualifier) {
this.subjectNameQualifier = subjectNameQualifier;
}
-
+
/**
* Method getSubjectConfirmationMethod returns the subjectConfirmationMethod of
* this SubjectBean object.
@@ -125,15 +125,15 @@ public class SubjectBean {
* Method setSubjectConfirmationMethod sets the subjectConfirmationMethod of
* this SubjectBean object.
*
- * @param subjectConfirmationMethod the subjectConfirmationMethod of this
- * SubjectBean object.
+ * @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.
@@ -143,7 +143,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.
@@ -151,7 +151,7 @@ public class SubjectBean {
public void setSubjectNameIDFormat(String subjectNameIDFormat) {
this.subjectNameIDFormat = subjectNameIDFormat;
}
-
+
/**
* Method getKeyInfo returns the keyInfo of this SubjectBean object.
*
@@ -169,7 +169,7 @@ public class SubjectBean {
public void setKeyInfo(KeyInfoBean keyInfo) {
this.keyInfo = keyInfo;
}
-
+
/**
* Method equals ...
*
@@ -188,28 +188,28 @@ public class SubjectBean {
} else if (subjectName != null && !subjectName.equals(that.subjectName)) {
return false;
}
-
+
if (subjectNameQualifier == null && that.subjectNameQualifier != null) {
return false;
- } else if (subjectNameQualifier != null &&
- !subjectNameQualifier.equals(that.subjectNameQualifier)) {
+ } else if (subjectNameQualifier != null &&
+ !subjectNameQualifier.equals(that.subjectNameQualifier)) {
return false;
}
-
+
if (subjectConfirmationMethod == null && that.subjectConfirmationMethod != null) {
return false;
- } else if (subjectConfirmationMethod != null &&
- !subjectConfirmationMethod.equals(that.subjectConfirmationMethod)) {
+ } else if (subjectConfirmationMethod != null &&
+ !subjectConfirmationMethod.equals(that.subjectConfirmationMethod)) {
return false;
}
-
+
if (subjectNameIDFormat == null && that.subjectNameIDFormat != null) {
return false;
- } else if (subjectNameIDFormat != null
- && !subjectNameIDFormat.equals(that.subjectNameIDFormat)) {
+ } else if (subjectNameIDFormat != null
+ && !subjectNameIDFormat.equals(that.subjectNameIDFormat)) {
return false;
}
-
+
if (keyInfo == null && that.keyInfo != null) {
return false;
} else if (keyInfo != null && !keyInfo.equals(that.keyInfo)) {
Modified: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/SubjectLocalityBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/SubjectLocalityBean.java?rev=1295267&r1=1295266&r2=1295267&view=diff
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/SubjectLocalityBean.java (original)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/bean/SubjectLocalityBean.java Wed Feb 29 20:54:51 2012
@@ -24,10 +24,14 @@ package org.swssf.wss.impl.saml.bean;
*/
public class SubjectLocalityBean {
- /** The ipAddress. */
+ /**
+ * The ipAddress.
+ */
private String ipAddress;
- /** The DNS Address. */
+ /**
+ * The DNS Address.
+ */
private String dnsAddress;
/**
@@ -40,8 +44,8 @@ public class SubjectLocalityBean {
/**
* Constructor for creating a SubjectLocalityBean with ip and dns addresses.
- *
- * @param ipAddress ip address
+ *
+ * @param ipAddress ip address
* @param dnsAddress dns address
*/
public SubjectLocalityBean(final String ipAddress, final String dnsAddress) {
@@ -51,7 +55,7 @@ public class SubjectLocalityBean {
/**
* Get the ip address.
- *
+ *
* @return the ipAddress
*/
public final String getIpAddress() {
@@ -60,7 +64,7 @@ public class SubjectLocalityBean {
/**
* Set the ip address.
- *
+ *
* @param ipAddress the ipAddress to set
*/
public final void setIpAddress(final String ipAddress) {
@@ -69,7 +73,7 @@ public class SubjectLocalityBean {
/**
* Get the dns address.
- *
+ *
* @return the dnsAddress
*/
public final String getDnsAddress() {
@@ -78,7 +82,7 @@ public class SubjectLocalityBean {
/**
* Set the dns address.
- *
+ *
* @param dnsAddress the dnsAddress to set
*/
public final void setDnsAddress(final String dnsAddress) {
Modified: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/builder/SAML1ComponentBuilder.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/builder/SAML1ComponentBuilder.java?rev=1295267&r1=1295266&r2=1295267&view=diff
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/builder/SAML1ComponentBuilder.java (original)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/builder/SAML1ComponentBuilder.java Wed Feb 29 20:54:51 2012
@@ -23,25 +23,7 @@ import org.joda.time.DateTime;
import org.opensaml.Configuration;
import org.opensaml.common.SAMLObjectBuilder;
import org.opensaml.common.SAMLVersion;
-
-import org.opensaml.saml1.core.Action;
-import org.opensaml.saml1.core.Assertion;
-import org.opensaml.saml1.core.Attribute;
-import org.opensaml.saml1.core.AttributeStatement;
-import org.opensaml.saml1.core.AttributeValue;
-import org.opensaml.saml1.core.Audience;
-import org.opensaml.saml1.core.AudienceRestrictionCondition;
-import org.opensaml.saml1.core.AuthenticationStatement;
-import org.opensaml.saml1.core.AuthorizationDecisionStatement;
-import org.opensaml.saml1.core.Conditions;
-import org.opensaml.saml1.core.ConfirmationMethod;
-import org.opensaml.saml1.core.DecisionTypeEnumeration;
-import org.opensaml.saml1.core.Evidence;
-import org.opensaml.saml1.core.NameIdentifier;
-import org.opensaml.saml1.core.Subject;
-import org.opensaml.saml1.core.SubjectConfirmation;
-import org.opensaml.saml1.core.SubjectLocality;
-
+import org.opensaml.saml1.core.*;
import org.opensaml.xml.XMLObject;
import org.opensaml.xml.XMLObjectBuilderFactory;
import org.opensaml.xml.schema.XSString;
@@ -49,18 +31,9 @@ import org.opensaml.xml.schema.impl.XSSt
import org.opensaml.xml.security.x509.BasicX509Credential;
import org.opensaml.xml.security.x509.X509KeyInfoGeneratorFactory;
import org.opensaml.xml.signature.KeyInfo;
-
import org.swssf.wss.ext.WSSecurityException;
import org.swssf.wss.impl.saml.OpenSAMLUtil;
-import org.swssf.wss.impl.saml.bean.ActionBean;
-import org.swssf.wss.impl.saml.bean.AttributeBean;
-import org.swssf.wss.impl.saml.bean.AttributeStatementBean;
-import org.swssf.wss.impl.saml.bean.AuthDecisionStatementBean;
-import org.swssf.wss.impl.saml.bean.AuthenticationStatementBean;
-import org.swssf.wss.impl.saml.bean.ConditionsBean;
-import org.swssf.wss.impl.saml.bean.KeyInfoBean;
-import org.swssf.wss.impl.saml.bean.SubjectBean;
-import org.swssf.wss.impl.saml.bean.SubjectLocalityBean;
+import org.swssf.wss.impl.saml.bean.*;
import java.util.ArrayList;
import java.util.List;
@@ -73,40 +46,40 @@ import java.util.UUID;
* Created on May 18, 2009
*/
public class SAML1ComponentBuilder {
-
+
private static SAMLObjectBuilder<Assertion> assertionV1Builder;
-
+
private static SAMLObjectBuilder<Conditions> conditionsV1Builder;
-
+
private static SAMLObjectBuilder<AudienceRestrictionCondition> audienceRestrictionV1Builder;
-
+
private static SAMLObjectBuilder<Audience> audienceV1Builder;
-
+
private static SAMLObjectBuilder<AuthenticationStatement> authenticationStatementV1Builder;
-
+
private static SAMLObjectBuilder<Subject> subjectV1Builder;
-
+
private static SAMLObjectBuilder<NameIdentifier> nameIdentifierV1Builder;
-
- private static SAMLObjectBuilder<SubjectConfirmation>
- subjectConfirmationV1Builder;
-
+
+ private static SAMLObjectBuilder<SubjectConfirmation>
+ subjectConfirmationV1Builder;
+
private static SAMLObjectBuilder<ConfirmationMethod> confirmationMethodV1Builder;
-
- private static SAMLObjectBuilder<AttributeStatement>
- attributeStatementV1Builder;
-
+
+ private static SAMLObjectBuilder<AttributeStatement>
+ attributeStatementV1Builder;
+
private static SAMLObjectBuilder<Attribute> attributeV1Builder;
-
+
private static XSStringBuilder stringBuilder;
-
- private static SAMLObjectBuilder<AuthorizationDecisionStatement>
- authorizationDecisionStatementV1Builder;
-
+
+ private static SAMLObjectBuilder<AuthorizationDecisionStatement>
+ authorizationDecisionStatementV1Builder;
+
private static SAMLObjectBuilder<Action> actionElementV1Builder;
-
+
private static XMLObjectBuilderFactory builderFactory = Configuration.getBuilderFactory();
-
+
private static SAMLObjectBuilder<SubjectLocality> subjectLocalityBuilder;
/**
@@ -118,20 +91,20 @@ public class SAML1ComponentBuilder {
@SuppressWarnings("unchecked")
public static Assertion createSamlv1Assertion(String issuer) {
if (assertionV1Builder == null) {
- assertionV1Builder = (SAMLObjectBuilder<Assertion>)
- builderFactory.getBuilder(Assertion.DEFAULT_ELEMENT_NAME);
+ assertionV1Builder = (SAMLObjectBuilder<Assertion>)
+ builderFactory.getBuilder(Assertion.DEFAULT_ELEMENT_NAME);
if (assertionV1Builder == null) {
throw new IllegalStateException(
- "OpenSaml engine not initialized. Please make sure to initialize the OpenSaml "
- + "engine prior using it"
+ "OpenSaml engine not initialized. Please make sure to initialize the OpenSaml "
+ + "engine prior using it"
);
}
}
- Assertion assertion =
- assertionV1Builder.buildObject(
- Assertion.DEFAULT_ELEMENT_NAME,
- Assertion.TYPE_NAME
- );
+ Assertion assertion =
+ assertionV1Builder.buildObject(
+ Assertion.DEFAULT_ELEMENT_NAME,
+ Assertion.TYPE_NAME
+ );
assertion.setVersion(SAMLVersion.VERSION_11);
assertion.setIssuer(issuer);
assertion.setIssueInstant(new DateTime()); // now
@@ -147,40 +120,40 @@ public class SAML1ComponentBuilder {
* @return A Saml 1.1 subject
*/
@SuppressWarnings("unchecked")
- public static Subject createSaml1v1Subject(SubjectBean subjectBean)
- throws org.opensaml.xml.security.SecurityException, WSSecurityException {
+ public static Subject createSaml1v1Subject(SubjectBean subjectBean)
+ throws org.opensaml.xml.security.SecurityException, WSSecurityException {
if (subjectV1Builder == null) {
- subjectV1Builder = (SAMLObjectBuilder<Subject>)
- builderFactory.getBuilder(Subject.DEFAULT_ELEMENT_NAME);
+ subjectV1Builder = (SAMLObjectBuilder<Subject>)
+ builderFactory.getBuilder(Subject.DEFAULT_ELEMENT_NAME);
}
if (nameIdentifierV1Builder == null) {
nameIdentifierV1Builder = (SAMLObjectBuilder<NameIdentifier>)
- builderFactory.getBuilder(NameIdentifier.DEFAULT_ELEMENT_NAME);
+ builderFactory.getBuilder(NameIdentifier.DEFAULT_ELEMENT_NAME);
}
if (subjectConfirmationV1Builder == null) {
subjectConfirmationV1Builder = (SAMLObjectBuilder<SubjectConfirmation>)
- builderFactory.getBuilder(SubjectConfirmation.DEFAULT_ELEMENT_NAME);
-
+ builderFactory.getBuilder(SubjectConfirmation.DEFAULT_ELEMENT_NAME);
+
}
if (confirmationMethodV1Builder == null) {
confirmationMethodV1Builder = (SAMLObjectBuilder<ConfirmationMethod>)
- builderFactory.getBuilder(ConfirmationMethod.DEFAULT_ELEMENT_NAME);
+ builderFactory.getBuilder(ConfirmationMethod.DEFAULT_ELEMENT_NAME);
}
-
+
Subject subject = subjectV1Builder.buildObject();
NameIdentifier nameIdentifier = nameIdentifierV1Builder.buildObject();
SubjectConfirmation subjectConfirmation = subjectConfirmationV1Builder.buildObject();
ConfirmationMethod confirmationMethod = confirmationMethodV1Builder.buildObject();
-
+
nameIdentifier.setNameQualifier(subjectBean.getSubjectNameQualifier());
nameIdentifier.setNameIdentifier(subjectBean.getSubjectName());
nameIdentifier.setFormat(subjectBean.getSubjectNameIDFormat());
String confirmationMethodStr = subjectBean.getSubjectConfirmationMethod();
-
+
if (confirmationMethodStr == null) {
confirmationMethodStr = SAML1Constants.CONF_SENDER_VOUCHES;
}
-
+
confirmationMethod.setConfirmationMethod(confirmationMethodStr);
subjectConfirmation.getConfirmationMethods().add(confirmationMethod);
if (subjectBean.getKeyInfo() != null) {
@@ -189,20 +162,22 @@ public class SAML1ComponentBuilder {
}
subject.setNameIdentifier(nameIdentifier);
subject.setSubjectConfirmation(subjectConfirmation);
-
+
return subject;
}
-
+
/**
* Create an Opensaml KeyInfo object from the parameters
+ *
* @param keyInfo the KeyInfo bean from which to extract security credentials
* @return the KeyInfo object
* @throws org.opensaml.xml.security.SecurityException
+ *
*/
- public static KeyInfo createKeyInfo(KeyInfoBean keyInfo)
- throws org.opensaml.xml.security.SecurityException, WSSecurityException {
+ public static KeyInfo createKeyInfo(KeyInfoBean keyInfo)
+ throws org.opensaml.xml.security.SecurityException, WSSecurityException {
if (keyInfo.getElement() != null) {
- return (KeyInfo)OpenSAMLUtil.fromDom(keyInfo.getElement());
+ return (KeyInfo) OpenSAMLUtil.fromDom(keyInfo.getElement());
} else {
// Set the certificate or public key
BasicX509Credential keyInfoCredential = new BasicX509Credential();
@@ -211,7 +186,7 @@ public class SAML1ComponentBuilder {
} else if (keyInfo.getPublicKey() != null) {
keyInfoCredential.setPublicKey(keyInfo.getPublicKey());
}
-
+
// Configure how to emit the certificate
X509KeyInfoGeneratorFactory kiFactory = new X509KeyInfoGeneratorFactory();
KeyInfoBean.CERT_IDENTIFIER certIdentifier = keyInfo.getCertIdentifer();
@@ -241,27 +216,27 @@ public class SAML1ComponentBuilder {
@SuppressWarnings("unchecked")
public static Conditions createSamlv1Conditions(ConditionsBean conditionsBean) {
if (conditionsV1Builder == null) {
- conditionsV1Builder = (SAMLObjectBuilder<Conditions>)
- builderFactory.getBuilder(Conditions.DEFAULT_ELEMENT_NAME);
-
+ conditionsV1Builder = (SAMLObjectBuilder<Conditions>)
+ builderFactory.getBuilder(Conditions.DEFAULT_ELEMENT_NAME);
+
}
Conditions conditions = conditionsV1Builder.buildObject();
-
+
if (conditionsBean == null) {
DateTime newNotBefore = new DateTime();
conditions.setNotBefore(newNotBefore);
conditions.setNotOnOrAfter(newNotBefore.plusMinutes(5));
return conditions;
}
-
+
int tokenPeriodMinutes = conditionsBean.getTokenPeriodMinutes();
DateTime notBefore = conditionsBean.getNotBefore();
DateTime notAfter = conditionsBean.getNotAfter();
-
+
if (notBefore != null && notAfter != null) {
if (notBefore.isAfter(notAfter)) {
throw new IllegalStateException(
- "The value of notBefore may not be after the value of notAfter"
+ "The value of notBefore may not be after the value of notAfter"
);
}
conditions.setNotBefore(notBefore);
@@ -274,16 +249,16 @@ public class SAML1ComponentBuilder {
}
conditions.setNotOnOrAfter(newNotBefore.plusMinutes(tokenPeriodMinutes));
}
-
+
if (conditionsBean.getAudienceURI() != null) {
- AudienceRestrictionCondition audienceRestriction =
- createSamlv1AudienceRestriction(conditionsBean.getAudienceURI());
+ AudienceRestrictionCondition audienceRestriction =
+ createSamlv1AudienceRestriction(conditionsBean.getAudienceURI());
conditions.getAudienceRestrictionConditions().add(audienceRestriction);
}
-
+
return conditions;
}
-
+
/**
* Create an AudienceRestrictionCondition object
*
@@ -291,19 +266,19 @@ public class SAML1ComponentBuilder {
* @return an AudienceRestrictionCondition object
*/
@SuppressWarnings("unchecked")
- public static AudienceRestrictionCondition
+ public static AudienceRestrictionCondition
createSamlv1AudienceRestriction(String audienceURI) {
if (audienceRestrictionV1Builder == null) {
- audienceRestrictionV1Builder = (SAMLObjectBuilder<AudienceRestrictionCondition>)
- builderFactory.getBuilder(AudienceRestrictionCondition.DEFAULT_ELEMENT_NAME);
+ audienceRestrictionV1Builder = (SAMLObjectBuilder<AudienceRestrictionCondition>)
+ builderFactory.getBuilder(AudienceRestrictionCondition.DEFAULT_ELEMENT_NAME);
}
if (audienceV1Builder == null) {
- audienceV1Builder = (SAMLObjectBuilder<Audience>)
- builderFactory.getBuilder(Audience.DEFAULT_ELEMENT_NAME);
+ audienceV1Builder = (SAMLObjectBuilder<Audience>)
+ builderFactory.getBuilder(Audience.DEFAULT_ELEMENT_NAME);
}
-
- AudienceRestrictionCondition audienceRestriction =
- audienceRestrictionV1Builder.buildObject();
+
+ AudienceRestrictionCondition audienceRestriction =
+ audienceRestrictionV1Builder.buildObject();
Audience audience = audienceV1Builder.buildObject();
audience.setUri(audienceURI);
audienceRestriction.getAudiences().add(audience);
@@ -318,43 +293,43 @@ public class SAML1ComponentBuilder {
*/
@SuppressWarnings("unchecked")
public static List<AuthenticationStatement> createSamlv1AuthenticationStatement(
- List<AuthenticationStatementBean> authBeans
+ List<AuthenticationStatementBean> authBeans
) throws org.opensaml.xml.security.SecurityException, WSSecurityException {
- List<AuthenticationStatement> authenticationStatements =
- new ArrayList<AuthenticationStatement>();
-
+ List<AuthenticationStatement> authenticationStatements =
+ new ArrayList<AuthenticationStatement>();
+
if (authenticationStatementV1Builder == null) {
- authenticationStatementV1Builder = (SAMLObjectBuilder<AuthenticationStatement>)
- builderFactory.getBuilder(AuthenticationStatement.DEFAULT_ELEMENT_NAME);
+ authenticationStatementV1Builder = (SAMLObjectBuilder<AuthenticationStatement>)
+ builderFactory.getBuilder(AuthenticationStatement.DEFAULT_ELEMENT_NAME);
}
if (subjectLocalityBuilder == null) {
- subjectLocalityBuilder = (SAMLObjectBuilder<SubjectLocality>)
- builderFactory.getBuilder(SubjectLocality.DEFAULT_ELEMENT_NAME);
+ subjectLocalityBuilder = (SAMLObjectBuilder<SubjectLocality>)
+ builderFactory.getBuilder(SubjectLocality.DEFAULT_ELEMENT_NAME);
}
if (authBeans != null && authBeans.size() > 0) {
for (AuthenticationStatementBean statementBean : authBeans) {
- AuthenticationStatement authenticationStatement =
- authenticationStatementV1Builder.buildObject(
- AuthenticationStatement.DEFAULT_ELEMENT_NAME,
- AuthenticationStatement.TYPE_NAME
- );
- Subject authSubject =
- SAML1ComponentBuilder.createSaml1v1Subject(statementBean.getSubject());
+ AuthenticationStatement authenticationStatement =
+ authenticationStatementV1Builder.buildObject(
+ AuthenticationStatement.DEFAULT_ELEMENT_NAME,
+ AuthenticationStatement.TYPE_NAME
+ );
+ Subject authSubject =
+ SAML1ComponentBuilder.createSaml1v1Subject(statementBean.getSubject());
authenticationStatement.setSubject(authSubject);
if (statementBean.getAuthenticationInstant() != null) {
authenticationStatement.setAuthenticationInstant(
- statementBean.getAuthenticationInstant()
+ statementBean.getAuthenticationInstant()
);
} else {
authenticationStatement.setAuthenticationInstant(new DateTime());
}
authenticationStatement.setAuthenticationMethod(
- transformAuthenticationMethod(statementBean.getAuthenticationMethod())
+ transformAuthenticationMethod(statementBean.getAuthenticationMethod())
);
-
+
SubjectLocalityBean subjectLocalityBean = statementBean.getSubjectLocality();
if (subjectLocalityBean != null) {
SubjectLocality subjectLocality = subjectLocalityBuilder.buildObject();
@@ -363,7 +338,7 @@ public class SAML1ComponentBuilder {
authenticationStatement.setSubjectLocality(subjectLocality);
}
-
+
authenticationStatements.add(authenticationStatement);
}
}
@@ -372,7 +347,7 @@ public class SAML1ComponentBuilder {
}
/**
- * Method transformAuthenticationMethod transforms the user-supplied authentication method
+ * Method transformAuthenticationMethod transforms the user-supplied authentication method
* value into one of the supported specification-compliant values.
* NOTE: Only "Password" is supported at this time.
*
@@ -397,11 +372,11 @@ public class SAML1ComponentBuilder {
*/
@SuppressWarnings("unchecked")
public static List<AttributeStatement> createSamlv1AttributeStatement(
- List<AttributeStatementBean> attributeData
+ List<AttributeStatementBean> attributeData
) throws org.opensaml.xml.security.SecurityException, WSSecurityException {
if (attributeStatementV1Builder == null) {
- attributeStatementV1Builder = (SAMLObjectBuilder<AttributeStatement>)
- builderFactory.getBuilder(AttributeStatement.DEFAULT_ELEMENT_NAME);
+ attributeStatementV1Builder = (SAMLObjectBuilder<AttributeStatement>)
+ builderFactory.getBuilder(AttributeStatement.DEFAULT_ELEMENT_NAME);
}
List<AttributeStatement> attributeStatements = new ArrayList<AttributeStatement>();
@@ -410,8 +385,8 @@ public class SAML1ComponentBuilder {
for (AttributeStatementBean statementBean : attributeData) {
// Create the attribute statementBean and set the subject
AttributeStatement attributeStatement = attributeStatementV1Builder.buildObject();
- Subject attributeSubject =
- SAML1ComponentBuilder.createSaml1v1Subject(statementBean.getSubject());
+ Subject attributeSubject =
+ SAML1ComponentBuilder.createSaml1v1Subject(statementBean.getSubject());
attributeStatement.setSubject(attributeSubject);
// Add the individual attributes
for (AttributeBean values : statementBean.getSamlAttributes()) {
@@ -419,13 +394,13 @@ public class SAML1ComponentBuilder {
if (attributeValues == null || attributeValues.isEmpty()) {
attributeValues = values.getCustomAttributeValues();
}
-
- Attribute samlAttribute =
- createSamlv1Attribute(
- values.getSimpleName(),
- values.getQualifiedName(),
- attributeValues
- );
+
+ Attribute samlAttribute =
+ createSamlv1Attribute(
+ values.getSimpleName(),
+ values.getQualifiedName(),
+ attributeValues
+ );
attributeStatement.getAttributes().add(samlAttribute);
}
// Add the completed attribute statementBean to the collection
@@ -440,36 +415,36 @@ public class SAML1ComponentBuilder {
* Create a SAML 1.1 attribute
*
* @param attributeName the Attribute Name
- * @param attributeUrn the Attribute Qualified Name
- * @param values the Attribute Values
+ * @param attributeUrn the Attribute Qualified Name
+ * @param values the Attribute Values
* @return a SAML 1.1 attribute
*/
@SuppressWarnings("unchecked")
public static Attribute createSamlv1Attribute(
- String attributeName,
- String attributeUrn,
- List<?> values
+ String attributeName,
+ String attributeUrn,
+ List<?> values
) {
if (attributeV1Builder == null) {
- attributeV1Builder = (SAMLObjectBuilder<Attribute>)
- builderFactory.getBuilder(Attribute.DEFAULT_ELEMENT_NAME);
+ attributeV1Builder = (SAMLObjectBuilder<Attribute>)
+ builderFactory.getBuilder(Attribute.DEFAULT_ELEMENT_NAME);
}
if (stringBuilder == null) {
- stringBuilder = (XSStringBuilder)builderFactory.getBuilder(XSString.TYPE_NAME);
+ stringBuilder = (XSStringBuilder) builderFactory.getBuilder(XSString.TYPE_NAME);
}
Attribute attribute = attributeV1Builder.buildObject();
attribute.setAttributeName(attributeName);
attribute.setAttributeNamespace(attributeUrn);
-
+
for (Object value : values) {
if (value instanceof String) {
- XSString attribute1 =
- stringBuilder.buildObject(AttributeValue.DEFAULT_ELEMENT_NAME, XSString.TYPE_NAME);
- attribute1.setValue((String)value);
+ XSString attribute1 =
+ stringBuilder.buildObject(AttributeValue.DEFAULT_ELEMENT_NAME, XSString.TYPE_NAME);
+ attribute1.setValue((String) value);
attribute.getAttributeValues().add(attribute1);
} else if (value instanceof XMLObject) {
- attribute.getAttributeValues().add((XMLObject)value);
+ attribute.getAttributeValues().add((XMLObject) value);
}
}
@@ -479,28 +454,28 @@ public class SAML1ComponentBuilder {
/**
* Create SAML 1.1 Authorization Decision Statement(s)
*
- * @param decisionData of type List<AuthDecisionStatementBean>
+ * @param decisionData of type List<AuthDecisionStatementBean>
* @return a list of SAML 1.1 Authorization Decision Statement(s)
*/
@SuppressWarnings("unchecked")
public static List<AuthorizationDecisionStatement> createSamlv1AuthorizationDecisionStatement(
- List<AuthDecisionStatementBean> decisionData)
- throws org.opensaml.xml.security.SecurityException, WSSecurityException {
- List<AuthorizationDecisionStatement> authDecisionStatements =
+ List<AuthDecisionStatementBean> decisionData)
+ throws org.opensaml.xml.security.SecurityException, WSSecurityException {
+ List<AuthorizationDecisionStatement> authDecisionStatements =
new ArrayList<AuthorizationDecisionStatement>();
if (authorizationDecisionStatementV1Builder == null) {
- authorizationDecisionStatementV1Builder =
- (SAMLObjectBuilder<AuthorizationDecisionStatement>)
- builderFactory.getBuilder(AuthorizationDecisionStatement.DEFAULT_ELEMENT_NAME);
-
+ authorizationDecisionStatementV1Builder =
+ (SAMLObjectBuilder<AuthorizationDecisionStatement>)
+ builderFactory.getBuilder(AuthorizationDecisionStatement.DEFAULT_ELEMENT_NAME);
+
}
if (decisionData != null && decisionData.size() > 0) {
for (AuthDecisionStatementBean decisionStatementBean : decisionData) {
- AuthorizationDecisionStatement authDecision =
- authorizationDecisionStatementV1Builder.buildObject();
- Subject authDecisionSubject =
- SAML1ComponentBuilder.createSaml1v1Subject(decisionStatementBean.getSubject());
+ AuthorizationDecisionStatement authDecision =
+ authorizationDecisionStatementV1Builder.buildObject();
+ Subject authDecisionSubject =
+ SAML1ComponentBuilder.createSaml1v1Subject(decisionStatementBean.getSubject());
authDecision.setSubject(authDecisionSubject);
authDecision.setResource(decisionStatementBean.getResource());
@@ -510,11 +485,11 @@ public class SAML1ComponentBuilder {
Action actionElement = createSamlv1Action(actionBean);
authDecision.getActions().add(actionElement);
}
-
- if (decisionStatementBean.getEvidence() instanceof Evidence) {
- authDecision.setEvidence((Evidence)decisionStatementBean.getEvidence());
+
+ if (decisionStatementBean.getEvidence() instanceof Evidence) {
+ authDecision.setEvidence((Evidence) decisionStatementBean.getEvidence());
}
-
+
authDecisionStatements.add(authDecision);
}
}
@@ -532,7 +507,7 @@ public class SAML1ComponentBuilder {
public static Action createSamlv1Action(ActionBean actionBean) {
if (actionElementV1Builder == null) {
actionElementV1Builder = (SAMLObjectBuilder<Action>)
- builderFactory.getBuilder(Action.DEFAULT_ELEMENT_NAME);
+ builderFactory.getBuilder(Action.DEFAULT_ELEMENT_NAME);
}
Action actionElement = actionElementV1Builder.buildObject();
@@ -549,7 +524,7 @@ public class SAML1ComponentBuilder {
* @return DecisionTypeEnumeration
*/
private static DecisionTypeEnumeration transformDecisionType(
- AuthDecisionStatementBean.Decision decision
+ AuthDecisionStatementBean.Decision decision
) {
DecisionTypeEnumeration decisionTypeEnum = DecisionTypeEnumeration.DENY;
if (decision.equals(AuthDecisionStatementBean.Decision.PERMIT)) {
Modified: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/builder/SAML1Constants.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/builder/SAML1Constants.java?rev=1295267&r1=1295266&r2=1295267&view=diff
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/builder/SAML1Constants.java (original)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/swssf/wss/impl/saml/builder/SAML1Constants.java Wed Feb 29 20:54:51 2012
@@ -27,54 +27,54 @@ package org.swssf.wss.impl.saml.builder;
* Created on May 18, 2009
*/
public class SAML1Constants {
-
+
//
// NAME ID FORMAT
//
-
- public static final String NAMEID_FORMAT_UNSPECIFIED =
- "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified";
-
- public static final String NAMEID_FORMAT_EMAIL_ADDRESS =
- "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress";
-
- public static final String NAMEID_FORMAT_X509_SUBJECT_NAME =
- "urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName";
-
- public static final String NAMEID_FORMAT_WINDOWS_DQN =
- "urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName";
+
+ public static final String NAMEID_FORMAT_UNSPECIFIED =
+ "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified";
+
+ public static final String NAMEID_FORMAT_EMAIL_ADDRESS =
+ "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress";
+
+ public static final String NAMEID_FORMAT_X509_SUBJECT_NAME =
+ "urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName";
+
+ public static final String NAMEID_FORMAT_WINDOWS_DQN =
+ "urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName";
//
// SUBJECT CONFIRMATION
//
-
+
/**
* Assertion Bearer Confirmation Method Identifier
*/
- public final static String CONF_BEARER =
- "urn:oasis:names:tc:SAML:1.0:cm:bearer";
+ public final static String CONF_BEARER =
+ "urn:oasis:names:tc:SAML:1.0:cm:bearer";
/**
* Holder of Key Confirmation Method Identifier
*/
- public final static String CONF_HOLDER_KEY =
- "urn:oasis:names:tc:SAML:1.0:cm:holder-of-key";
+ public final static String CONF_HOLDER_KEY =
+ "urn:oasis:names:tc:SAML:1.0:cm:holder-of-key";
/**
* Sender Vouches Confirmation Method Identifier
*/
- public final static String CONF_SENDER_VOUCHES =
- "urn:oasis:names:tc:SAML:1.0:cm:sender-vouches";
+ public final static String CONF_SENDER_VOUCHES =
+ "urn:oasis:names:tc:SAML:1.0:cm:sender-vouches";
//
// AUTH METHOD
//
-
+
/**
* The authentication was performed by means of a password.
*/
- public static final String AUTH_METHOD_PASSWORD =
- "urn:oasis:names:tc:SAML:1.0:am:password";
+ public static final String AUTH_METHOD_PASSWORD =
+ "urn:oasis:names:tc:SAML:1.0:am:password";
/**
* The authentication was performed by means of the Kerberos protocol [RFC 1510],
@@ -83,7 +83,7 @@ public class SAML1Constants {
public static final String AUTH_METHOD_KERBEROS = "urn:ietf:rfc:1510";
/**
- * The authentication was performed by means of Secure Remote Password protocol as specified in
+ * The authentication was performed by means of Secure Remote Password protocol as specified in
* [RFC 2945].
*/
public static final String AUTH_METHOD_SRP = "urn:ietf:rfc:2945";
@@ -91,11 +91,11 @@ public class SAML1Constants {
/**
* The authentication was performed by means of an unspecified hardware token.
*/
- public static final String AUTH_METHOD_HARDWARE_TOKEN =
- "urn:oasis:names:tc:SAML:1.0:am:HardwareToken";
+ public static final String AUTH_METHOD_HARDWARE_TOKEN =
+ "urn:oasis:names:tc:SAML:1.0:am:HardwareToken";
/**
- * The authentication was performed using either the SSL or TLS protocol with certificate
+ * The authentication was performed using either the SSL or TLS protocol with certificate
* based client authentication. TLS is described in [RFC 2246].
*/
public static final String AUTH_METHOD_TLS_CLIENT = "urn:ietf:rfc:2246";
@@ -105,32 +105,32 @@ public class SAML1Constants {
* means of an X.509 PKI [X.500][PKIX]. It may have been one of the mechanisms for which a more
* specific identifier has been defined.
*/
- public static final String AUTH_METHOD_X509 =
- "urn:oasis:names:tc:SAML:1.0:am:X509-PKI";
+ public static final String AUTH_METHOD_X509 =
+ "urn:oasis:names:tc:SAML:1.0:am:X509-PKI";
/**
- * The authentication was performed by some (unspecified) mechanism on a key authenticated by
- * means of a PGP web of trust [PGP]. It may have been one of the mechanisms for which a more
+ * The authentication was performed by some (unspecified) mechanism on a key authenticated by
+ * means of a PGP web of trust [PGP]. It may have been one of the mechanisms for which a more
* specific identifier has been defined.
*/
- public static final String AUTH_METHOD_PGP =
- "urn:oasis:names:tc:SAML:1.0:am:PGP";
+ public static final String AUTH_METHOD_PGP =
+ "urn:oasis:names:tc:SAML:1.0:am:PGP";
/**
- * The authentication was performed by some (unspecified) mechanism on a key authenticated by
- * means of a SPKI PKI [SPKI]. It may have been one of the mechanisms for which a more specific
+ * The authentication was performed by some (unspecified) mechanism on a key authenticated by
+ * means of a SPKI PKI [SPKI]. It may have been one of the mechanisms for which a more specific
* identifier has been defined.
*/
- public static final String AUTH_METHOD_SPKI =
- "urn:oasis:names:tc:SAML:1.0:am:SPKI";
+ public static final String AUTH_METHOD_SPKI =
+ "urn:oasis:names:tc:SAML:1.0:am:SPKI";
/**
- * The authentication was performed by some (unspecified) mechanism on a key authenticated by
+ * The authentication was performed by some (unspecified) mechanism on a key authenticated by
* means of a XKMS trust service [XKMS]. It may have been one of the mechanisms for which a more
* specific identifier has been defined.
*/
- public static final String AUTH_METHOD_XKMS =
- "urn:oasis:names:tc:SAML:1.0:am:XKMS";
+ public static final String AUTH_METHOD_XKMS =
+ "urn:oasis:names:tc:SAML:1.0:am:XKMS";
/**
* The authentication was performed by means of an XML digital signature [RFC 3075].
@@ -140,6 +140,6 @@ public class SAML1Constants {
/**
* The authentication was performed by an unspecified means.
*/
- public static final String AUTH_METHOD_UNSPECIFIED =
- "urn:oasis:names:tc:SAML:1.0:am:unspecified";
+ public static final String AUTH_METHOD_UNSPECIFIED =
+ "urn:oasis:names:tc:SAML:1.0:am:unspecified";
}