Picketlink SVN: r682 - in picketlink-seam/trunk: picketlink-seam and 1 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-01-31 11:16:32 -0500 (Mon, 31 Jan 2011)
New Revision: 682
Modified:
picketlink-seam/trunk/picketlink-seam/pom.xml
picketlink-seam/trunk/pom.xml
picketlink-seam/trunk/seam-sp/pom.xml
Log:
use parent
Modified: picketlink-seam/trunk/picketlink-seam/pom.xml
===================================================================
--- picketlink-seam/trunk/picketlink-seam/pom.xml 2011-01-31 16:16:13 UTC (rev 681)
+++ picketlink-seam/trunk/picketlink-seam/pom.xml 2011-01-31 16:16:32 UTC (rev 682)
@@ -1,12 +1,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-parent</artifactId>
- <version>5</version>
+ <groupId>org.picketlink</groupId>
+ <artifactId>picketlink-seam-parent</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <version>2.0.0-SNAPSHOT</version>
<artifactId>picketlink-seam</artifactId>
<packaging>jar</packaging>
<name>PicketLink Federation Bindings for Seam</name>
Modified: picketlink-seam/trunk/pom.xml
===================================================================
--- picketlink-seam/trunk/pom.xml 2011-01-31 16:16:13 UTC (rev 681)
+++ picketlink-seam/trunk/pom.xml 2011-01-31 16:16:32 UTC (rev 682)
@@ -16,6 +16,7 @@
<modules>
<module>parent</module>
<module>picketlink-seam</module>
+ <module>seam-sp</module>
</modules>
<reporting>
Modified: picketlink-seam/trunk/seam-sp/pom.xml
===================================================================
--- picketlink-seam/trunk/seam-sp/pom.xml 2011-01-31 16:16:13 UTC (rev 681)
+++ picketlink-seam/trunk/seam-sp/pom.xml 2011-01-31 16:16:32 UTC (rev 682)
@@ -2,9 +2,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.picketlink</groupId>
- <artifactId>picketlink-federation-webapps</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- <relativePath>../</relativePath>
+ <artifactId>picketlink-seam-parent</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>seam-sp</artifactId>
@@ -12,7 +11,7 @@
<name>Seam Service Provider</name>
<dependencies>
<dependency>
- <groupId>org.picketlink</groupId>
+ <groupId>org.jboss</groupId>
<artifactId>picketlink-seam</artifactId>
<version>${project.version}</version>
<exclusions>
13 years, 11 months
Picketlink SVN: r681 - in picketlink-seam/trunk: parent and 1 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-01-31 11:16:13 -0500 (Mon, 31 Jan 2011)
New Revision: 681
Added:
picketlink-seam/trunk/parent/
picketlink-seam/trunk/parent/.project
picketlink-seam/trunk/parent/.settings/
picketlink-seam/trunk/parent/.settings/org.maven.ide.eclipse.prefs
picketlink-seam/trunk/parent/pom.xml
Log:
add parent
Added: picketlink-seam/trunk/parent/.project
===================================================================
--- picketlink-seam/trunk/parent/.project (rev 0)
+++ picketlink-seam/trunk/parent/.project 2011-01-31 16:16:13 UTC (rev 681)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>parent</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Added: picketlink-seam/trunk/parent/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- picketlink-seam/trunk/parent/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ picketlink-seam/trunk/parent/.settings/org.maven.ide.eclipse.prefs 2011-01-31 16:16:13 UTC (rev 681)
@@ -0,0 +1,8 @@
+#Wed Jan 26 22:52:42 CST 2011
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
Added: picketlink-seam/trunk/parent/pom.xml
===================================================================
--- picketlink-seam/trunk/parent/pom.xml (rev 0)
+++ picketlink-seam/trunk/parent/pom.xml 2011-01-31 16:16:13 UTC (rev 681)
@@ -0,0 +1,158 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-parent</artifactId>
+ <version>5</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.picketlink</groupId>
+ <artifactId>picketlink-seam-parent</artifactId>
+ <packaging>pom</packaging>
+ <version>2.0.0-SNAPSHOT</version>
+ <name>PicketLink Federation Seam- Parent</name>
+ <url>http://labs.jboss.org/portal/picketlink/</url>
+ <description>PicketLink is a cross-cutting project that handles identity needs for the JEMS projects</description>
+ <licenses>
+ <license>
+ <name>lgpl</name>
+ <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+ </license>
+ </licenses>
+ <organization>
+ <name>JBoss Inc.</name>
+ <url>http://www.jboss.org</url>
+ </organization>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <printSummary>true</printSummary>
+ <disableXmlReport>false</disableXmlReport>
+ <includes>
+ <include>**/**TestCase.java</include>
+ </includes>
+ <forkMode>pertest</forkMode>
+ <argLine>${surefire.jvm.args}</argLine>
+ <useFile>false</useFile>
+ <trimStackTrace>false</trimStackTrace>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.4</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <repositories>
+ <repository>
+ <id>jboss-public-repository-group</id>
+ <name>JBoss Public Maven Repository Group</name>
+ <url>http://repository.jboss.org/nexus/content/groups/public/</url>
+ <layout>default</layout>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <layout>default</layout>
+ <url>http://repository.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshots Repository</name>
+ <layout>default</layout>
+ <url>http://snapshots.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ </repositories>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.4</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>apache-log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.apache</groupId>
+ <artifactId>xmlsec</artifactId>
+ <version>1.4.3</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>apache-logging</groupId>
+ <artifactId>commons-logging-api</artifactId>
+ <version>1.0.3</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>javax.persistence</groupId>
+ <artifactId>persistence-api</artifactId>
+ <version>1.0</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbossxacml</artifactId>
+ <version>2.0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openid4java</groupId>
+ <artifactId>openid4java-nodeps</artifactId>
+ <version>0.9.5</version>
+ </dependency>
+ <dependency>
+ <groupId>nekohtml</groupId>
+ <artifactId>nekohtml</artifactId>
+ <version>1.9.12</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.18</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
+ <version>6.1.18</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+</project>
Property changes on: picketlink-seam/trunk/parent/pom.xml
___________________________________________________________________
Name: svn:executable
+ *
13 years, 11 months
Picketlink SVN: r680 - picketlink-seam/trunk and 1 other directory.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-01-31 11:11:06 -0500 (Mon, 31 Jan 2011)
New Revision: 680
Added:
picketlink-seam/trunk/seam-sp/
Removed:
federation/trunk/picketlink-webapps/seam-sp/
Log:
move the seam webapp
Copied: picketlink-seam/trunk/seam-sp (from rev 679, federation/trunk/picketlink-webapps/seam-sp)
13 years, 11 months
Picketlink SVN: r679 - federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/auth.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-01-31 10:51:17 -0500 (Mon, 31 Jan 2011)
New Revision: 679
Added:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/auth/SecurityActions.java
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/auth/AbstractSTSLoginModule.java
Log:
add the customization of group principal name
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/auth/AbstractSTSLoginModule.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/auth/AbstractSTSLoginModule.java 2011-01-27 18:18:29 UTC (rev 678)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/auth/AbstractSTSLoginModule.java 2011-01-31 15:51:17 UTC (rev 679)
@@ -37,7 +37,6 @@
import org.apache.log4j.Logger;
import org.jboss.security.SecurityContext;
-import org.jboss.security.SecurityContextAssociation;
import org.jboss.security.SimpleGroup;
import org.jboss.security.SimplePrincipal;
import org.jboss.security.identity.Role;
@@ -48,10 +47,10 @@
import org.picketlink.identity.federation.core.exceptions.ParsingException;
import org.picketlink.identity.federation.core.wstrust.STSClient;
import org.picketlink.identity.federation.core.wstrust.STSClientConfig;
+import org.picketlink.identity.federation.core.wstrust.STSClientConfig.Builder;
import org.picketlink.identity.federation.core.wstrust.STSClientFactory;
import org.picketlink.identity.federation.core.wstrust.SamlCredential;
import org.picketlink.identity.federation.core.wstrust.WSTrustException;
-import org.picketlink.identity.federation.core.wstrust.STSClientConfig.Builder;
import org.w3c.dom.Element;
/**
@@ -138,6 +137,12 @@
* Also note that subclasses are not forced to put configuration options in a file. They
* can all be set as options just like the 'configFile' is specified above.
*
+ * <h3>Additional Configuration</h3>
+ * <p>
+ * groupPrincipalName: If you want the group principal in the subject representing the subject roles to have a name that is different
+ * from "Roles".
+ * </p>
+ *
* @author <a href="mailto:dbevenius@jboss.com">Daniel Bevenius</a>
*/
public abstract class AbstractSTSLoginModule implements LoginModule
@@ -164,51 +169,62 @@
* file for WSTrustClient.
*/
public static final String STS_CONFIG_FILE = "configFile";
+
+ /**
+ * Historically, JBoss has used the "Roles" as the group principal name in the subject
+ * to represent the subject roles. Users can customize this name with this option.
+ */
+ public static final String GROUP_PRINCIPAL_NAME = "groupPrincipalName";
/**
* The subject to be populated.
*/
- private Subject subject;
+ protected Subject subject;
/**
* Callback handler used to gather information from the caller.
*/
- private CallbackHandler callbackHandler;
+ protected CallbackHandler callbackHandler;
/**
* WS-Trust SAML Assertion element.
*/
- private Element samlToken;
+ protected Element samlToken;
/**
* The outcome of the authentication process.
*/
- private boolean success;
+ protected boolean success;
/**
* The options map passed into this login modules initalize method.
*/
- private Map<String, ?> options;
+ protected Map<String, ?> options;
/**
* The shared state map passed into this login modules initalize method.
*/
- private Map<String, ?> sharedState;
+ protected Map<String, ?> sharedState;
/**
* Indicates whether password stacking option was configured.
*/
- private boolean passwordStacking;
+ protected boolean passwordStacking;
/**
* Indicates whether the password-stacking options was specifed as 'useFirstPass'.
*/
- private boolean useFirstPass;
+ protected boolean useFirstPass;
/**
* Indicates whether the 'useOptionsCredentials' was configured.
*/
- private boolean useOptionsCredentials;
+ protected boolean useOptionsCredentials;
+
+ /**
+ * Name of the group principal. If unconfigured, will be "null"
+ */
+ protected String groupPrincipalName = null;
/**
* Initialized this login module. Simple stores the passed in fields and
@@ -241,6 +257,10 @@
final Boolean useOptionsCreds = Boolean.valueOf((String) options.get(OPTIONS_CREDENTIALS));
if (useOptionsCreds != null)
useOptionsCredentials = useOptionsCreds.booleanValue();
+
+ final String gpPrincipalName = (String) options.get( GROUP_PRINCIPAL_NAME );
+ if( gpPrincipalName != null && gpPrincipalName.length() > 0 )
+ groupPrincipalName = gpPrincipalName;
}
/**
@@ -559,7 +579,18 @@
{
roleMappingContext.performMapping(contextMap, null);
RoleGroup group = roleMappingContext.getMappingResult().getMappedObject();
- SimpleGroup rolePrincipal = new SimpleGroup(group.getRoleName());
+
+ SimpleGroup rolePrincipal = null;
+
+ if( groupPrincipalName != null )
+ {
+ rolePrincipal = new SimpleGroup( groupPrincipalName );
+ }
+ else
+ {
+ rolePrincipal= new SimpleGroup( group.getRoleName() );
+ }
+
for (Role role : group.getRoles())
{
rolePrincipal.addMember(new SimplePrincipal(role.getRoleName()));
@@ -570,7 +601,7 @@
protected MappingManager getMappingManager()
{
- SecurityContext securityContext = SecurityContextAssociation.getSecurityContext();
+ SecurityContext securityContext = SecurityActions.getSecurityContext();
if (securityContext == null)
{
return null;
@@ -580,5 +611,4 @@
return securityContext.getMappingManager();
}
}
-
-}
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/auth/SecurityActions.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/auth/SecurityActions.java (rev 0)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/auth/SecurityActions.java 2011-01-31 15:51:17 UTC (rev 679)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.core.wstrust.auth;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+import org.jboss.security.SecurityContext;
+import org.jboss.security.SecurityContextAssociation;
+
+/**
+ * Privileged Blocks
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jan 31, 2011
+ */
+class SecurityActions
+{
+ /**
+ * Get the current security context on the association
+ * @return
+ */
+ static SecurityContext getSecurityContext()
+ {
+ return AccessController.doPrivileged( new PrivilegedAction<SecurityContext>()
+ {
+ public SecurityContext run()
+ {
+ return SecurityContextAssociation.getSecurityContext();
+ }
+ } );
+
+ }
+
+}
\ No newline at end of file
13 years, 11 months
Picketlink SVN: r678 - in federation/trunk: picketlink-web/src/main/java/org/picketlink/identity/federation/web/process and 1 other directory.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-01-27 13:18:29 -0500 (Thu, 27 Jan 2011)
New Revision: 678
Modified:
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/BaseFormAuthenticator.java
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPPostFormAuthenticator.java
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPRedirectFormAuthenticator.java
federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/process/ServiceProviderBaseProcessor.java
Log:
PLFED-130: inject optional issuer id
Modified: federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/BaseFormAuthenticator.java
===================================================================
--- federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/BaseFormAuthenticator.java 2011-01-27 18:02:02 UTC (rev 677)
+++ federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/BaseFormAuthenticator.java 2011-01-27 18:18:29 UTC (rev 678)
@@ -69,6 +69,8 @@
protected String serviceURL = null;
protected String identityURL = null;
+
+ protected String issuerID = null;
protected String configFile = GeneralConstants.CONFIG_FILE_LOCATION;
@@ -114,6 +116,15 @@
{
this.saveRestoreRequest = saveRestoreRequest;
}
+
+ /**
+ * Set a separate issuer id
+ * @param issuerID
+ */
+ public void setIssuerID(String issuerID)
+ {
+ this.issuerID = issuerID;
+ }
/**
* Perform validation os the request object
Modified: federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPPostFormAuthenticator.java
===================================================================
--- federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPPostFormAuthenticator.java 2011-01-27 18:02:02 UTC (rev 677)
+++ federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPPostFormAuthenticator.java 2011-01-27 18:18:29 UTC (rev 678)
@@ -125,6 +125,9 @@
try
{
ServiceProviderBaseProcessor baseProcessor = new ServiceProviderBaseProcessor(true, serviceURL);
+ if( issuerID != null )
+ baseProcessor.setIssuer( issuerID );
+
baseProcessor.setIdentityURL( identityURL );
saml2HandlerResponse = baseProcessor.process(httpContext, handlers, chainLock);
Modified: federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPRedirectFormAuthenticator.java
===================================================================
--- federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPRedirectFormAuthenticator.java 2011-01-27 18:02:02 UTC (rev 677)
+++ federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPRedirectFormAuthenticator.java 2011-01-27 18:18:29 UTC (rev 678)
@@ -119,7 +119,8 @@
SAML2HandlerResponse saml2HandlerResponse = null;
try
{
- ServiceProviderBaseProcessor baseProcessor = new ServiceProviderBaseProcessor(false, serviceURL);
+ ServiceProviderBaseProcessor baseProcessor = new ServiceProviderBaseProcessor(false, serviceURL);
+
initializeSAMLProcessor(baseProcessor);
saml2HandlerResponse = baseProcessor.process(httpContext, handlers, chainLock);
@@ -412,6 +413,9 @@
*/
protected void initializeSAMLProcessor(ServiceProviderBaseProcessor processor)
{
+ if( issuerID != null )
+ processor.setIssuer( issuerID );
+
processor.setConfiguration(spConfiguration);
}
Modified: federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/process/ServiceProviderBaseProcessor.java
===================================================================
--- federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/process/ServiceProviderBaseProcessor.java 2011-01-27 18:02:02 UTC (rev 677)
+++ federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/process/ServiceProviderBaseProcessor.java 2011-01-27 18:18:29 UTC (rev 678)
@@ -65,6 +65,8 @@
protected SPType spConfiguration;
protected TrustKeyManager keyManager;
+ protected String issuer = null;
+
protected boolean supportSignatures = false;
/**
@@ -112,6 +114,15 @@
public void setSupportSignatures(boolean supportSignatures)
{
this.supportSignatures = supportSignatures;
+ }
+
+ /**
+ * Set a separate issuer that is different from the service url
+ * @param issuer
+ */
+ public void setIssuer(String issuer)
+ {
+ this.issuer = issuer;
}
public SAML2HandlerResponse process(HTTPContext httpContext,
@@ -175,7 +186,16 @@
protected SAML2HandlerRequest getSAML2HandlerRequest(SAMLDocumentHolder documentHolder,
HTTPContext httpContext)
{
- IssuerInfoHolder holder = new IssuerInfoHolder(this.serviceURL);
+ IssuerInfoHolder holder = null;
+
+ if( issuer == null )
+ {
+ holder = new IssuerInfoHolder(this.serviceURL);
+ }
+ else
+ {
+ holder = new IssuerInfoHolder( issuer );
+ }
return new DefaultSAML2HandlerRequest(httpContext,
holder.getIssuer(), documentHolder,
13 years, 11 months
Picketlink SVN: r677 - federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-01-27 13:02:02 -0500 (Thu, 27 Jan 2011)
New Revision: 677
Modified:
federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SAML2STSLoginModule.java
Log:
PLFED-129: make STSClient configurable and make private instance var protected
Modified: federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SAML2STSLoginModule.java
===================================================================
--- federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SAML2STSLoginModule.java 2011-01-27 17:48:37 UTC (rev 676)
+++ federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SAML2STSLoginModule.java 2011-01-27 18:02:02 UTC (rev 677)
@@ -77,6 +77,9 @@
* specify the username and password that are to be used by the application server to authenticate to the STS and
* have the SAML assertions validated.
* </p>
+ * <p>
+ * <b>NOTE:</b> Sub-classes can use {@link #getSTSClient()} method to customize the {@link STSClient} class to make calls to STS/
+ * </p>
*
* @author <a href="mailto:sguilhen@redhat.com">Stefan Guilhen</a>
*/
@@ -84,13 +87,13 @@
public class SAML2STSLoginModule extends AbstractServerLoginModule
{
- private String stsConfigurationFile;
+ protected String stsConfigurationFile;
- private Principal principal;
+ protected Principal principal;
- private SamlCredential credential;
+ protected SamlCredential credential;
- private AssertionType assertion;
+ protected AssertionType assertion;
/*
* (non-Javadoc)
@@ -160,9 +163,8 @@
throw exception;
}
- // send the assertion to the STS for validation.
- Builder builder = new Builder(this.stsConfigurationFile);
- STSClient client = new STSClient(builder.build());
+ // send the assertion to the STS for validation.
+ STSClient client = this.getSTSClient() ;
try
{
boolean isValid = client.validateToken(assertionElement);
@@ -299,4 +301,14 @@
}
return null;
}
+
+ /**
+ * Get the {@link STSClient} object with which we can make calls to the STS
+ * @return
+ */
+ protected STSClient getSTSClient()
+ {
+ Builder builder = new Builder(this.stsConfigurationFile);
+ return new STSClient(builder.build());
+ }
}
\ No newline at end of file
13 years, 11 months
Picketlink SVN: r676 - in federation/trunk: picketlink-fed-core/src/test/resources and 1 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-01-27 12:48:37 -0500 (Thu, 27 Jan 2011)
New Revision: 676
Added:
federation/trunk/picketlink-bindings/src/test/resources/log4j.xml
federation/trunk/picketlink-fed-core/src/test/resources/log4j.xml
federation/trunk/picketlink-web/src/test/resources/log4j.xml
Log:
add log4j.xml for testing
Added: federation/trunk/picketlink-bindings/src/test/resources/log4j.xml
===================================================================
--- federation/trunk/picketlink-bindings/src/test/resources/log4j.xml (rev 0)
+++ federation/trunk/picketlink-bindings/src/test/resources/log4j.xml 2011-01-27 17:48:37 UTC (rev 676)
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml 34717 2005-08-08 18:15:31Z adrian $ -->
+
+<!--
+ | For more configuration infromation and examples see the Jakarta Log4j
+ | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <!-- A time/date based rolling appender -->
+ <appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
+ <param name="File" value="${basedir}/target/test.log"/>
+ <param name="Append" value="true"/>
+
+ <!-- Rollover at midnight each day -->
+ <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+ <!-- Rollover at the top of each hour
+ <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
+ -->
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+
+ <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
+ <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
+ -->
+ </layout>
+ </appender>
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Threshold" value="TRACE"/>
+ <param name="Target" value="System.out"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+ </layout>
+ </appender>
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <!-- Limit JBoss categories to INFO
+ <category name="org.jboss">
+ <priority value="INFO" class="org.jboss.logging.XLevel"/>
+ </category>
+ -->
+
+ <category name="org.jboss">
+ <priority value="TRACE"/>
+ </category>
+ <category name="org.picketlink">
+ <priority value="TRACE"/>
+ </category>
+
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
Property changes on: federation/trunk/picketlink-bindings/src/test/resources/log4j.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: federation/trunk/picketlink-fed-core/src/test/resources/log4j.xml
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/resources/log4j.xml (rev 0)
+++ federation/trunk/picketlink-fed-core/src/test/resources/log4j.xml 2011-01-27 17:48:37 UTC (rev 676)
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml 34717 2005-08-08 18:15:31Z adrian $ -->
+
+<!--
+ | For more configuration infromation and examples see the Jakarta Log4j
+ | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <!-- A time/date based rolling appender -->
+ <appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
+ <param name="File" value="${basedir}/target/test.log"/>
+ <param name="Append" value="true"/>
+
+ <!-- Rollover at midnight each day -->
+ <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+ <!-- Rollover at the top of each hour
+ <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
+ -->
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+
+ <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
+ <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
+ -->
+ </layout>
+ </appender>
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Threshold" value="TRACE"/>
+ <param name="Target" value="System.out"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+ </layout>
+ </appender>
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <!-- Limit JBoss categories to INFO
+ <category name="org.jboss">
+ <priority value="INFO" class="org.jboss.logging.XLevel"/>
+ </category>
+ -->
+
+ <category name="org.jboss">
+ <priority value="TRACE"/>
+ </category>
+ <category name="org.picketlink">
+ <priority value="TRACE"/>
+ </category>
+
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
Property changes on: federation/trunk/picketlink-fed-core/src/test/resources/log4j.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: federation/trunk/picketlink-web/src/test/resources/log4j.xml
===================================================================
--- federation/trunk/picketlink-web/src/test/resources/log4j.xml (rev 0)
+++ federation/trunk/picketlink-web/src/test/resources/log4j.xml 2011-01-27 17:48:37 UTC (rev 676)
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml 34717 2005-08-08 18:15:31Z adrian $ -->
+
+<!--
+ | For more configuration infromation and examples see the Jakarta Log4j
+ | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <!-- A time/date based rolling appender -->
+ <appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
+ <param name="File" value="${basedir}/target/test.log"/>
+ <param name="Append" value="true"/>
+
+ <!-- Rollover at midnight each day -->
+ <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+ <!-- Rollover at the top of each hour
+ <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
+ -->
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+
+ <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
+ <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
+ -->
+ </layout>
+ </appender>
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Threshold" value="TRACE"/>
+ <param name="Target" value="System.out"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+ </layout>
+ </appender>
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <!-- Limit JBoss categories to INFO
+ <category name="org.jboss">
+ <priority value="INFO" class="org.jboss.logging.XLevel"/>
+ </category>
+ -->
+
+ <category name="org.jboss">
+ <priority value="TRACE"/>
+ </category>
+ <category name="org.picketlink">
+ <priority value="TRACE"/>
+ </category>
+
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
Property changes on: federation/trunk/picketlink-web/src/test/resources/log4j.xml
___________________________________________________________________
Name: svn:executable
+ *
13 years, 11 months
Picketlink SVN: r675 - in federation/trunk: picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/workflow and 1 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-01-27 12:47:31 -0500 (Thu, 27 Jan 2011)
New Revision: 675
Modified:
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/BaseFormAuthenticator.java
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPPostFormAuthenticator.java
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPRedirectFormAuthenticator.java
federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/workflow/SAML2PostTomcatWorkflowUnitTestCase.java
federation/trunk/picketlink-fed-api/src/test/resources/log4j.xml
Log:
PLFED-128:save/restore req
Modified: federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/BaseFormAuthenticator.java
===================================================================
--- federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/BaseFormAuthenticator.java 2011-01-27 17:15:07 UTC (rev 674)
+++ federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/BaseFormAuthenticator.java 2011-01-27 17:47:31 UTC (rev 675)
@@ -78,6 +78,8 @@
protected Map<String, Object> chainConfigOptions = new HashMap<String, Object>();
+ //Whether the authenticator has to to save and restore request
+ protected boolean saveRestoreRequest = true;
/**
* A Lock for Handler operations in the chain
@@ -106,8 +108,13 @@
public void setSamlHandlerChainClass(String samlHandlerChainClass)
{
this.samlHandlerChainClass = samlHandlerChainClass;
+ }
+
+ public void setSaveRestoreRequest(boolean saveRestoreRequest)
+ {
+ this.saveRestoreRequest = saveRestoreRequest;
}
-
+
/**
* Perform validation os the request object
* @param request
@@ -149,6 +156,7 @@
//Mock test purpose
public void testStart() throws LifecycleException
{
+ this.saveRestoreRequest = false;
processStart();
}
Modified: federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPPostFormAuthenticator.java
===================================================================
--- federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPPostFormAuthenticator.java 2011-01-27 17:15:07 UTC (rev 674)
+++ federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPPostFormAuthenticator.java 2011-01-27 17:47:31 UTC (rev 675)
@@ -76,7 +76,7 @@
protected boolean supportSignatures = false;
- protected TrustKeyManager keyManager;
+ protected TrustKeyManager keyManager;
/**
* A flag to indicate that we are going to validate signature
@@ -89,7 +89,7 @@
super();
ServerDetector detector = new ServerDetector();
jbossEnv = detector.isJboss();
- }
+ }
@Override
public boolean authenticate(Request request, Response response, LoginConfig loginConfig) throws IOException
@@ -157,6 +157,10 @@
{
try
{
+ if( saveRestoreRequest )
+ {
+ this.saveRequest(request, session);
+ }
sendRequestToIDP(destination, samlResponseDocument, relayState, response,
willSendRequest);
return false;
@@ -252,6 +256,11 @@
session.setNote(Constants.SESS_USERNAME_NOTE, username);
session.setNote(Constants.SESS_PASSWORD_NOTE, password);
request.setUserPrincipal(principal);
+ //Get the original saved request
+ if( saveRestoreRequest )
+ {
+ this.restoreRequest(request, session);
+ }
register(request, response, principal, Constants.FORM_METHOD, username, password);
return true;
Modified: federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPRedirectFormAuthenticator.java
===================================================================
--- federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPRedirectFormAuthenticator.java 2011-01-27 17:15:07 UTC (rev 674)
+++ federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPRedirectFormAuthenticator.java 2011-01-27 17:47:31 UTC (rev 675)
@@ -171,6 +171,11 @@
log.trace("URL used for sending:" + destinationURL);
}
+ if( saveRestoreRequest )
+ {
+ this.saveRequest(request, session);
+ }
+
HTTPRedirectUtil.sendRedirectForRequestor(destinationURL, response);
return false;
}
@@ -289,6 +294,11 @@
session.setNote(Constants.SESS_USERNAME_NOTE, username);
session.setNote(Constants.SESS_PASSWORD_NOTE, password);
request.setUserPrincipal(principal);
+
+ if( saveRestoreRequest )
+ {
+ this.restoreRequest(request, session);
+ }
register(request, response, principal, Constants.FORM_METHOD, username, password);
return true;
Modified: federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/workflow/SAML2PostTomcatWorkflowUnitTestCase.java
===================================================================
--- federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/workflow/SAML2PostTomcatWorkflowUnitTestCase.java 2011-01-27 17:15:07 UTC (rev 674)
+++ federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/workflow/SAML2PostTomcatWorkflowUnitTestCase.java 2011-01-27 17:47:31 UTC (rev 675)
@@ -82,7 +82,7 @@
//First we go to the employee application
MockCatalinaContextClassLoader mclSPEmp = setupTCL(profile + "/sp/employee");
Thread.currentThread().setContextClassLoader(mclSPEmp);
- SPPostFormAuthenticator spEmpl = new SPPostFormAuthenticator();
+ SPPostFormAuthenticator spEmpl = new SPPostFormAuthenticator();
MockCatalinaContext context = new MockCatalinaContext();
spEmpl.setContainer(context);
Modified: federation/trunk/picketlink-fed-api/src/test/resources/log4j.xml
===================================================================
--- federation/trunk/picketlink-fed-api/src/test/resources/log4j.xml 2011-01-27 17:15:07 UTC (rev 674)
+++ federation/trunk/picketlink-fed-api/src/test/resources/log4j.xml 2011-01-27 17:47:31 UTC (rev 675)
@@ -68,6 +68,9 @@
<category name="org.jboss">
<priority value="TRACE"/>
</category>
+ <category name="org.picketlink">
+ <priority value="TRACE"/>
+ </category>
<!-- ======================= -->
<!-- Setup the Root category -->
13 years, 11 months
Picketlink SVN: r674 - federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-01-27 12:15:07 -0500 (Thu, 27 Jan 2011)
New Revision: 674
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/STSClient.java
Log:
PLFED-127: no arg ctr/setDispatch
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/STSClient.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/STSClient.java 2011-01-27 16:42:24 UTC (rev 673)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/STSClient.java 2011-01-27 17:15:07 UTC (rev 674)
@@ -61,6 +61,24 @@
private String targetNS = "http://org.picketlink.trust/sts/";
+ /**
+ * Constructor
+ * @see {@link #setDispatch(Dispatch)} for the setting of the {@link Dispatch} object
+ */
+ public STSClient()
+ {
+ }
+
+ /**
+ * <p>
+ * Constructor that creates the {@link Dispatch} for use.
+ * </p>
+ * <p>
+ * If you need to customize the ws properties, it is suggested to preconstruct a {@link Dispatch}
+ * object and use the default no-arg constructor followed by a {@linkplain #setDispatch(Dispatch)} call
+ * </p>
+ * @param config
+ */
public STSClient(STSClientConfig config)
{
QName service = new QName(targetNS, config.getServiceName());
@@ -77,10 +95,28 @@
// add the username and password to the request context.
reqContext.put(BindingProvider.USERNAME_PROPERTY, config.getUsername());
reqContext.put(BindingProvider.PASSWORD_PROPERTY, config.getPassword());
- }
- dispatchLocal.set(dispatch);
+ }
+ setDispatch(dispatch);
}
+
+ /**
+ * Set the {@link Dispatch} object for use
+ * @param dispatch
+ */
+ public void setDispatch( Dispatch<Source> dispatch )
+ {
+ if( dispatch == null )
+ throw new IllegalArgumentException( "dispatch is null" );
+
+ dispatchLocal.set( dispatch );
+ }
+ /**
+ * Issue a token
+ * @param tokenType
+ * @return
+ * @throws WSTrustException
+ */
public Element issueToken(String tokenType) throws WSTrustException
{
// create a custom token request message.
@@ -184,12 +220,20 @@
return request;
}
+ /**
+ * Issue a token
+ * @param request
+ * @return
+ * @throws WSTrustException
+ */
public Element issueToken(RequestSecurityToken request) throws WSTrustException
{
if (request.getRequestType() == null)
request.setRequestType(URI.create(WSTrustConstants.ISSUE_REQUEST));
if (request.getContext() == null)
request.setContext("default-context");
+
+ validateDispatch();
DOMSource requestSource = this.createSourceFromRequest(request);
Source response = dispatchLocal.get().invoke(requestSource);
@@ -231,8 +275,16 @@
return (Element) rstr.getFirstChild();
}
+ /**
+ * Renew a token
+ * @param tokenType
+ * @param token
+ * @return
+ * @throws WSTrustException
+ */
public Element renewToken(String tokenType, Element token) throws WSTrustException
{
+ validateDispatch();
RequestSecurityToken request = new RequestSecurityToken();
request.setContext("context");
@@ -281,12 +333,18 @@
Node rstr = nodes.item(0);
- return (Element) rstr.getFirstChild();
-
+ return (Element) rstr.getFirstChild();
}
+ /**
+ * Validate a token
+ * @param token
+ * @return
+ * @throws WSTrustException
+ */
public boolean validateToken(Element token) throws WSTrustException
{
+ validateDispatch();
RequestSecurityToken request = new RequestSecurityToken();
request.setContext("context");
@@ -332,6 +390,7 @@
*/
public boolean cancelToken(Element securityToken) throws WSTrustException
{
+ validateDispatch();
// create a WS-Trust cancel request containing the specified token.
RequestSecurityToken request = new RequestSecurityToken();
request.setRequestType(URI.create(WSTrustConstants.CANCEL_REQUEST));
@@ -359,6 +418,10 @@
}
}
+ /**
+ * Get the dispatch object
+ * @return
+ */
public Dispatch<Source> getDispatch()
{
return dispatchLocal.get();
@@ -378,4 +441,13 @@
throw new WSTrustException("Error creating source from request: " + e.getMessage(), e);
}
}
+
+ /**
+ * Validate that we have a {@code Dispatch} to work with
+ */
+ private void validateDispatch()
+ {
+ if( getDispatch() == null )
+ throw new RuntimeException( "Dispatch has not been set" );
+ }
}
\ No newline at end of file
13 years, 11 months
Picketlink SVN: r673 - in federation/trunk: picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/openid and 4 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-01-27 11:42:24 -0500 (Thu, 27 Jan 2011)
New Revision: 673
Modified:
federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/subject/PicketLinkGroup.java
federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/openid/OpenIDManager.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/common/SAMLProtocolContext.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AdviceType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AssertionType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AttributeStatementType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AttributeType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AudienceRestrictionType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AuthnContextType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AuthzDecisionStatementType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/ConditionsType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/EvidenceType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/ProxyRestrictionType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/SubjectConfirmationDataType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/SubjectType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/AttributeAuthorityDescriptorType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/AttributeConsumingServiceType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/AuthnAuthorityDescriptorType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/ContactType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/EndpointType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/EntitiesDescriptorType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/EntityDescriptorType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/ExtensionsType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/IDPSSODescriptorType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/KeyDescriptorType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/OrganizationType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/PDPDescriptorType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/RoleDescriptorType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/SPSSODescriptorType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/SSODescriptorType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/TypeWithOtherAttributes.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/AssertionIDRequestType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/AttributeQueryType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/AuthzDecisionQueryType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/ExtensionsType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/IDPListType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/LogoutRequestType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/RequestedAuthnContextType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/ResponseType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/ScopingType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/StatusDetailType.java
Log:
javadoc, add/remove combo for collection elements
Modified: federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/subject/PicketLinkGroup.java
===================================================================
--- federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/subject/PicketLinkGroup.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/subject/PicketLinkGroup.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -43,23 +43,38 @@
{
super(name);
}
-
- public boolean addMember(Principal user)
+ /**
+ * Add a role principal to group
+ * @see java.security.acl.Group#addMember(java.security.Principal)
+ */
+ public boolean addMember(Principal role )
{
- return roles.add(user);
+ return roles.add( role );
}
- public boolean isMember(Principal member)
+ /**
+ * Check if the role is a member of the group
+ * @see java.security.acl.Group#isMember(java.security.Principal)
+ */
+ public boolean isMember(Principal role )
{
- return roles.contains(member);
+ return roles.contains( role );
}
+ /**
+ * Get the group members
+ * @see java.security.acl.Group#members()
+ */
public Enumeration<? extends Principal> members()
{
Set<Principal> readOnly = Collections.unmodifiableSet(roles);
return Collections.enumeration(readOnly);
}
-
+
+ /**
+ * Remove role from groups
+ * @see java.security.acl.Group#removeMember(java.security.Principal)
+ */
public boolean removeMember(Principal user)
{
return roles.remove(user);
Modified: federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/openid/OpenIDManager.java
===================================================================
--- federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/openid/OpenIDManager.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/openid/OpenIDManager.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -415,6 +415,11 @@
this.providers = providers;
}
+ void addProvider( DiscoveryInformation provider )
+ {
+ this.providers.add( provider );
+ }
+
List<DiscoveryInformation> get()
{
return Collections.unmodifiableList(providers);
@@ -424,6 +429,5 @@
{
return this.providers != null ? providers.size() : 0;
}
-
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/common/SAMLProtocolContext.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/common/SAMLProtocolContext.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/common/SAMLProtocolContext.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -60,46 +60,82 @@
protected AssertionType issuedAssertion;
+ /**
+ * Get the Issuer ID
+ * @return instance of {@link NameIDType}
+ */
public NameIDType getIssuerID()
{
return issuerID;
}
+ /**
+ * Set the Issuer ID
+ * @param issuerID {@link NameIDType}
+ */
public void setIssuerID( NameIDType issuerID)
{
this.issuerID = issuerID;
}
+ /**
+ * Get the subject
+ * @return {@link SubjectType}
+ */
public SubjectType getSubjectType()
{
return subjectType;
}
+ /**
+ * Set the subject
+ * @param subjectType {@link SubjectType}
+ */
public void setSubjectType(SubjectType subjectType)
{
this.subjectType = subjectType;
}
+ /**
+ * Get the conditions
+ * @return {@link ConditionsType}
+ */
public ConditionsType getConditions()
{
return conditions;
}
+ /**
+ * Set the conditions
+ * @param conditions {@link ConditionsType}
+ */
public void setConditions(ConditionsType conditions)
{
this.conditions = conditions;
}
+ /**
+ * Get the statements as a read-only list
+ * @return {@link StatementAbstractType}
+ */
public List<StatementAbstractType> getStatements()
{
return Collections.unmodifiableList( statements );
}
+ /**
+ * Add a list of statements
+ * @param statements {@link List}
+ */
public void setStatements(List<StatementAbstractType> statements)
{
this.statements = statements;
}
+ /**
+ * Get the previously issued assertion by the STS
+ * @return {@link AssertionType}
+ */
public AssertionType getIssuedAssertion()
{
SecurityManager sm = System.getSecurityManager();
@@ -109,6 +145,10 @@
return issuedAssertion;
}
+ /**
+ * Set the assertion issued by the STS
+ * @param issuedAssertion {@link AssertionType}
+ */
public void setIssuedAssertion(AssertionType issuedAssertion)
{
SecurityManager sm = System.getSecurityManager();
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AdviceType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AdviceType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AdviceType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -54,13 +54,18 @@
{
protected List<Object> advices = new ArrayList<Object>();
+ /**
+ * Add an advice
+ * @param obj
+ */
public void addAdvice( Object obj )
{
advices.add( obj );
}
/**
- * Gets the advices.
+ * Gets the advices. (Read only list)
+ * @return {@link List} read only
*/
public List<Object> getAdvices()
{
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AssertionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AssertionType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AssertionType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -75,98 +75,212 @@
private Set<StatementAbstractType> statements = new LinkedHashSet<StatementAbstractType>();
+ /**
+ * Create an assertion
+ * @param iD ID of the assertion (Required)
+ * @param issueInstant {@link XMLGregorianCalendar} issue instant (required)
+ * @param version
+ */
public AssertionType(String iD, XMLGregorianCalendar issueInstant, String version)
{
+ if( iD == null )
+ throw new IllegalArgumentException( "iD is null" );
+ if( issueInstant == null )
+ throw new IllegalArgumentException( "issueInstant is null" );
+ if( version == null )
+ throw new IllegalArgumentException( "version is null" );
+
this.ID = iD;
this.issueInstant = issueInstant;
this.version = version;
}
+ /**
+ * Get the assertion id
+ * @return {@link String}
+ */
public String getID()
{
return ID;
}
+ /**
+ * Get the subject
+ * @return {@link SubjectType}
+ */
public SubjectType getSubject()
{
+ checkSTSPermission();
return subject;
}
+ /**
+ * Set the subject
+ * @param subject
+ */
public void setSubject(SubjectType subject)
{
+ checkSTSPermission();
this.subject = subject;
}
+ /**
+ * Get the Issue Instant
+ * @return {@link XMLGregorianCalendar}
+ */
public XMLGregorianCalendar getIssueInstant()
{
return issueInstant;
}
+ /**
+ * Get the version of SAML
+ * @return {@link String}
+ */
public String getVersion()
{
return version;
}
+ /**
+ * Get the advice
+ * @return {@link AdviceType}
+ */
public AdviceType getAdvice()
{
return advice;
}
+ /**
+ * Set the advice
+ * @param advice {@link advice}
+ */
public void setAdvice(AdviceType advice)
{
+ checkSTSPermission();
+
this.advice = advice;
}
+ /**
+ * Get the conditions
+ * @return {@link ConditionsType}
+ */
public ConditionsType getConditions()
{
+ checkSTSPermission();
+
return conditions;
}
+ /**
+ * Set the conditions
+ * @param conditions {@link ConditionsType}
+ */
public void setConditions(ConditionsType conditions)
{
+ checkSTSPermission();
+
this.conditions = conditions;
}
+ /**
+ * Get the issuer
+ * @return {@link NameIDType}
+ */
public NameIDType getIssuer()
{
return issuer;
}
+ /**
+ * Set the issuer
+ * @param issuer {@link NameIDType}
+ */
public void setIssuer(NameIDType issuer)
{
+ checkSTSPermission();
+
this.issuer = issuer;
}
+ /**
+ * Add a statement
+ * @param statement {@link StatementAbstractType}
+ */
public void addStatement( StatementAbstractType statement )
{
+ checkSTSPermission();
+
this.statements.add( statement );
}
+ /**
+ * Add a collection of statements
+ * @param statement {@link Collection}
+ */
public void addStatements( Collection<StatementAbstractType> statement )
{
+ checkSTSPermission();
+
this.statements.addAll( statement );
}
+ /**
+ * Add a set of statements
+ * @param statement {@link Collection}
+ */
+ public void addStatements( Set<StatementAbstractType> statement )
+ {
+ checkSTSPermission();
+
+ this.statements.addAll( statement );
+ }
+
+ /**
+ * Get a read only set of statements
+ * @return {@link Set}
+ */
public Set<StatementAbstractType> getStatements()
{
+ checkSTSPermission();
+
return Collections.unmodifiableSet( statements );
}
+ /**
+ * Get the signature as a DOM element
+ * @return {@link Element}
+ */
public Element getSignature()
{
return signature;
}
+ /**
+ * Set the signature DOM element
+ * @param signature
+ */
public void setSignature(Element signature)
{
this.signature = signature;
}
+ /**
+ * Update the issue instant
+ * @param xg
+ */
public void updateIssueInstant( XMLGregorianCalendar xg )
{
+ checkSTSPermission();
+
+ this.issueInstant = xg;
+ }
+
+
+ protected void checkSTSPermission()
+ {
SecurityManager sm = System.getSecurityManager();
if( sm != null )
sm.checkPermission( new RuntimePermission( "org.picketlink.sts") );
-
- this.issueInstant = xg;
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AttributeStatementType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AttributeStatementType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AttributeStatementType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -54,13 +54,27 @@
private static final long serialVersionUID = 1L;
protected List<ASTChoiceType> attributes = new ArrayList<ASTChoiceType>();
+ /**
+ * Add an attribute
+ * @param attribute
+ */
public void addAttribute( ASTChoiceType attribute )
{
attributes.add( attribute );
}
+
+ /**
+ * Remove an attribute
+ * @param attribute
+ */
+ public void removeAttribute( ASTChoiceType attribute )
+ {
+ attributes.remove( attribute );
+ }
/**
- * Gets the attributes.
+ * Gets the attributes.
+ * @return a read only {@link List}
*/
public List<ASTChoiceType> getAttributes()
{
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AttributeType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AttributeType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AttributeType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -63,10 +63,23 @@
this.name = name;
}
+ /**
+ * Add an attribute value to the attribute
+ * @param value {@link Object}
+ */
public void addAttributeValue( Object value )
{
attributeValue.add(value);
}
+
+ /**
+ * Remove an attribute value to the attribute
+ * @param value {@link Object}
+ */
+ public void removeAttributeValue( Object value )
+ {
+ attributeValue.remove(value);
+ }
/**
* Gets the value of the attributeValue property.
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AudienceRestrictionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AudienceRestrictionType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AudienceRestrictionType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -50,10 +50,23 @@
{
protected List<URI> audience = new ArrayList<URI>();
+ /**
+ * Add an audience
+ * @param audienceval
+ */
public void addAudience( URI audienceval )
{
audience.add( audienceval );
}
+
+ /**
+ * Remove an audience
+ * @param audienceval
+ */
+ public void removeAudience( URI audienceval )
+ {
+ audience.remove( audienceval );
+ }
/**
* Gets the value of the audience property.
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AuthnContextType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AuthnContextType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AuthnContextType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -70,46 +70,95 @@
private Set<URIType> URITypes = new HashSet<URIType>();
-
+ /**
+ * Add an authenticating authority
+ * @param aa {@link URI}
+ */
public void addAuthenticatingAuthority( URI aa )
{
authenticatingAuthority.add( aa );
}
+ /**
+ * Add Authenticating Authority
+ * @param aas an array of {@link URI}
+ */
public void addAuthenticatingAuthority( URI[] aas )
{
authenticatingAuthority.addAll( Arrays.asList( aas ) );
}
+ /**
+ * Remove an authenticating authority
+ * @param aa
+ */
+ public void removeAuthenticatingAuthority( URI aa )
+ {
+ authenticatingAuthority.remove( aa );
+ }
+
+ /**
+ * Get a read only set of authenticating authority
+ * @return
+ */
public Set<URI> getAuthenticatingAuthority()
{
return Collections.unmodifiableSet( authenticatingAuthority );
}
+ /**
+ * Get the sequence
+ * @return
+ */
public AuthnContextTypeSequence getSequence()
{
return sequence;
}
+ /**
+ * Set the authn context sequence
+ * @param sequence
+ */
public void setSequence(AuthnContextTypeSequence sequence)
{
this.sequence = sequence;
}
+ /**
+ * Add an URI type
+ * @param aa
+ */
public void addURIType( URIType aa )
{
URITypes.add( aa );
}
+ /**
+ * Add an array of URI Type
+ * @param aas
+ */
public void addURIType( URIType[] aas )
{
URITypes.addAll( Arrays.asList( aas ) );
}
+ /**
+ * Get a read only set of URI type
+ * @return
+ */
public Set<URIType> getURIType()
{
return Collections.unmodifiableSet( URITypes );
- }
+ }
+
+ /**
+ * Add an URI type
+ * @param aa
+ */
+ public void removeURIType( URIType aa )
+ {
+ URITypes.remove( aa );
+ }
/**
<sequence>
@@ -136,6 +185,11 @@
{
URITypes.add( aa );
}
+
+ public void removeURIType( URIType aa )
+ {
+ URITypes.remove( aa );
+ }
public void addURIType( URIType[] aas )
{
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AuthzDecisionStatementType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AuthzDecisionStatementType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AuthzDecisionStatementType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -58,17 +58,31 @@
protected DecisionType decision;
/**
- * Gets the value of the action property.
+ * Get the list of actions (read-only list)
+ * @return {@link List} read only
*/
public List<ActionType> getAction()
{
return Collections.unmodifiableList( this.action );
}
+ /**
+ * Add an action
+ * @param actionType
+ */
public void addAction( ActionType actionType )
{
action.add(actionType);
}
+
+ /**
+ * Remove an action
+ * @param actionType
+ */
+ public void removeAction( ActionType actionType )
+ {
+ action.remove(actionType);
+ }
/**
* Gets the value of the evidence property.
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/ConditionsType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/ConditionsType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/ConditionsType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -60,10 +60,23 @@
protected XMLGregorianCalendar notBefore;
protected XMLGregorianCalendar notOnOrAfter;
+ /**
+ * Add a condition
+ * @param condition
+ */
public void addCondition( ConditionAbstractType condition )
{
this.conditions.add( condition );
}
+
+ /**
+ * Remove a condition
+ * @param condition
+ */
+ public void removeCondition( ConditionAbstractType condition )
+ {
+ this.conditions.remove( condition );
+ }
/**
* Gets an read only conditions list.
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/EvidenceType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/EvidenceType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/EvidenceType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -54,11 +54,28 @@
{
protected List<ChoiceType> evidences = new ArrayList<ChoiceType>();
+ /**
+ * Add an evidence
+ * @param evidence
+ */
public void addEvidence( ChoiceType evidence )
{
evidences.add( evidence );
}
+
+ /**
+ * Remove an evidence
+ * @param evidence
+ */
+ public void removeEvidence( ChoiceType evidence )
+ {
+ evidences.remove( evidence );
+ }
+ /**
+ * Get the list of evidences as a read only list
+ * @return
+ */
public List<ChoiceType> evidences()
{
return Collections.unmodifiableList( evidences );
@@ -110,6 +127,5 @@
{
return encryptedAssertion;
}
-
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/ProxyRestrictionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/ProxyRestrictionType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/ProxyRestrictionType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -55,6 +55,10 @@
protected BigInteger count;
+ /**
+ * Add an audience
+ * @param a
+ */
public void addAudience( URI a )
{
this.audience.add( a );
@@ -68,6 +72,15 @@
{
return Collections.unmodifiableList( audience );
}
+
+ /**
+ * Remove an audience
+ * @param a
+ */
+ public void removeAudience( URI a )
+ {
+ this.audience.remove( a );
+ }
/**
* Gets the value of the count property.
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/SubjectConfirmationDataType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/SubjectConfirmationDataType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/SubjectConfirmationDataType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -209,8 +209,22 @@
return Collections.unmodifiableMap( otherAttributes );
}
+ /**
+ * Add an other attribute
+ * @param qname
+ * @param str
+ */
public void addOtherAttribute( QName qname, String str )
{
otherAttributes.put(qname, str );
- }
-}
+ }
+
+ /**
+ * Remove an other attribute
+ * @param qname {@link QName} of the attribute to be removed
+ */
+ public void removeOtherAttribute( QName qname )
+ {
+ otherAttributes.remove( qname );
+ }
+}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/SubjectType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/SubjectType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/SubjectType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -63,30 +63,58 @@
protected STSubType subType;
+ /**
+ * Get the {@link STSubType}
+ * @return
+ */
public STSubType getSubType()
{
return subType;
}
+ /**
+ * Set the {@link STSubType}
+ * @param subType
+ */
public void setSubType(STSubType subType)
{
this.subType = subType;
}
+ /**
+ * Get the size of subject confirmations
+ * @return
+ */
public int getCount()
{
return subjectConfirmation.size();
}
+ /**
+ * Get a list of subject confirmations
+ * @return {@link} read only list of subject confirmation
+ */
public List<SubjectConfirmationType> getConfirmation()
{
return Collections.unmodifiableList( subjectConfirmation );
}
+ /**
+ * Add a subject confirmation
+ * @param con
+ */
public void addConfirmation( SubjectConfirmationType con )
{
subjectConfirmation.add( con );
}
+ /**
+ * Remove a subject confirmation
+ * @param con
+ */
+ public void removeConfirmation( SubjectConfirmationType con )
+ {
+ subjectConfirmation.remove( con );
+ }
public static class STSubType
{
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/AttributeAuthorityDescriptorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/AttributeAuthorityDescriptorType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/AttributeAuthorityDescriptorType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -45,32 +45,97 @@
super(protocolSupport);
}
+ /**
+ * Add an attribute service
+ * @param endpoint
+ */
public void addAttributeService( EndpointType endpoint )
{
this.attributeService.add(endpoint);
}
+ /**
+ * Add an assertion id request service
+ * @param endpoint
+ */
public void addAssertionIDRequestService( EndpointType endpoint )
{
this.assertionIDRequestService.add(endpoint);
}
+ /**
+ * Add a name id
+ * @param str
+ */
public void addNameIDFormat( String str )
{
this.nameIDFormat.add(str);
}
+ /**
+ * Add an attribute profile
+ * @param str
+ */
public void addAttributeProfile( String str )
{
this.attributeProfile.add(str);
}
+ /**
+ * Add an attribute
+ * @param attribute
+ */
public void addAttribute( AttributeType attribute )
{
this.attribute.add(attribute);
}
+
+ /**
+ * Remove an attribute service
+ * @param endpoint
+ */
+ public void removeAttributeService( EndpointType endpoint )
+ {
+ this.attributeService.remove( endpoint);
+ }
/**
+ * Remove assertion id request service
+ * @param endpoint
+ */
+ public void removeAssertionIDRequestService( EndpointType endpoint )
+ {
+ this.assertionIDRequestService.remove(endpoint);
+ }
+
+ /**
+ * Remove Name ID
+ * @param str
+ */
+ public void removeNameIDFormat( String str )
+ {
+ this.nameIDFormat.remove(str);
+ }
+
+ /**
+ * Remove attribute profile
+ * @param str
+ */
+ public void removeAttributeProfile( String str )
+ {
+ this.attributeProfile.remove(str);
+ }
+
+ /**
+ * Remove attribute
+ * @param attribute
+ */
+ public void removeAttribute( AttributeType attribute )
+ {
+ this.attribute.remove(attribute);
+ }
+
+ /**
* Gets the value of the attributeService property.
* <p>
* Objects of the following type(s) are allowed in the list
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/AttributeConsumingServiceType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/AttributeConsumingServiceType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/AttributeConsumingServiceType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -48,6 +48,83 @@
}
/**
+ * Add serviceName
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link LocalizedNameType }
+ *
+ *
+ */
+ public void addServiceName( LocalizedNameType service )
+ {
+ this.serviceName.add(service) ;
+ }
+
+ /**
+ * Add serviceDescription.
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link LocalizedNameType }
+ *
+ *
+ */
+ public void addServiceDescription( LocalizedNameType desc )
+ {
+ this.serviceDescription.add(desc);
+ }
+
+ /**
+ * Add requestedAttribute
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link RequestedAttributeType }
+ *
+ */
+ public void addRequestedAttribute( RequestedAttributeType req )
+ {
+ this.requestedAttribute.add(req);
+ }
+
+ /**
+ * remove serviceName
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link LocalizedNameType }
+ *
+ *
+ */
+ public void removeServiceName( LocalizedNameType service )
+ {
+ this.serviceName.remove(service) ;
+ }
+
+ /**
+ * remove serviceDescription.
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link LocalizedNameType }
+ *
+ *
+ */
+ public void removeServiceDescription( LocalizedNameType desc )
+ {
+ this.serviceDescription.remove(desc);
+ }
+
+ /**
+ * remove requestedAttribute
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link RequestedAttributeType }
+ *
+ */
+ public void removeRequestedAttribute( RequestedAttributeType req )
+ {
+ this.requestedAttribute.remove(req);
+ }
+
+
+ /**
* Gets the value of the serviceName property.
* <p>
* Objects of the following type(s) are allowed in the list
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/AuthnAuthorityDescriptorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/AuthnAuthorityDescriptorType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/AuthnAuthorityDescriptorType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -36,22 +36,61 @@
super(protocolSupport);
}
+ /**
+ * Add authn query service
+ * @param endpoint
+ */
public void addAuthnQueryService( EndpointType endpoint )
{
this.authnQueryService.add(endpoint);
}
+ /**
+ * Add assertion id request service
+ * @param endpoint
+ */
public void addAssertionIDRequestService( EndpointType endpoint )
{
this.assertionIDRequestService.add(endpoint);
}
+ /**
+ * Add name id format
+ * @param str
+ */
public void addNameIDFormat( String str )
{
this.nameIDFormat.add(str);
}
+
+ /**
+ * Remove authn query service
+ * @param endpoint
+ */
+ public void removeAuthnQueryService( EndpointType endpoint )
+ {
+ this.authnQueryService.remove(endpoint);
+ }
/**
+ * remove assertion id request service
+ * @param endpoint
+ */
+ public void removeAssertionIDRequestService( EndpointType endpoint )
+ {
+ this.assertionIDRequestService.remove(endpoint);
+ }
+
+ /**
+ * remove name id format
+ * @param str
+ */
+ public void removeNameIDFormat( String str )
+ {
+ this.nameIDFormat.remove(str);
+ }
+
+ /**
* Gets the value of the authnQueryService property.
* <p>
* Objects of the following type(s) are allowed in the list
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/ContactType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/ContactType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/ContactType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -143,12 +143,37 @@
this.surName = value;
}
-
+ /**
+ * Add an email address
+ * @param email
+ */
public void addEmailAddress( String email )
{
this.emailAddress.add(email);
}
+ /**
+ * remove a telephone
+ * @param tel
+ */
+ public void removeTelephone( String tel )
+ {
+ this.telephoneNumber.remove(tel);
+ }
+
+ /**
+ * remove an email address
+ * @param email
+ */
+ public void removeEmailAddress( String email )
+ {
+ this.emailAddress.remove(email);
+ }
+
+ /**
+ * Add a telephone
+ * @param tel
+ */
public void addTelephone( String tel )
{
this.telephoneNumber.add(tel);
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/EndpointType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/EndpointType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/EndpointType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -45,6 +45,24 @@
this.binding = binding;
this.location = location;
}
+
+ /**
+ * Add an object
+ * @param obj
+ */
+ public void addObject( Object obj )
+ {
+ this.any.add(obj);
+ }
+
+ /**
+ * remove an object
+ * @param obj
+ */
+ public void removeObject( Object obj )
+ {
+ this.any.remove(obj);
+ }
/**
* Gets the value of the any property.
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/EntitiesDescriptorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/EntitiesDescriptorType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/EntitiesDescriptorType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -101,11 +101,25 @@
this.extensions = value;
}
+ /**
+ * Add an entity descriptor
+ * @param obj
+ */
public void addEntityDescriptor( Object obj )
{
this.entityDescriptor.add( obj );
}
+
/**
+ * Remove an entity descriptor
+ * @param obj
+ */
+ public void removeEntityDescriptor( Object obj )
+ {
+ this.entityDescriptor.remove( obj );
+ }
+
+ /**
* Gets the value of the entityDescriptorOrEntitiesDescriptor property.
* <p>
* Objects of the following type(s) are allowed in the list
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/EntityDescriptorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/EntityDescriptorType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/EntityDescriptorType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -215,15 +215,32 @@
this.extensions = value;
}
+ /**
+ * Get a read only list of choice types
+ * @return
+ */
public List<EDTChoiceType> getChoiceType()
{
return Collections.unmodifiableList( choiceType );
}
+ /**
+ * Add a choice type
+ * @param choiceType
+ */
public void addChoiceType(EDTChoiceType choiceType)
{
this.choiceType.add( choiceType );
}
+
+ /**
+ * Remove a choice type
+ * @param choiceType
+ */
+ public void removeChoiceType(EDTChoiceType choiceType)
+ {
+ this.choiceType.remove( choiceType );
+ }
/**
* Gets the value of the organization property.
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/ExtensionsType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/ExtensionsType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/ExtensionsType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -30,10 +30,23 @@
{
protected List<Object> any = new ArrayList<Object>();
- public void addAny( Object obj )
+ /**
+ * Add an object
+ * @param obj
+ */
+ public void addObject( Object obj )
{
this.any.add(obj);
}
+
+ /**
+ * Remove an object
+ * @param obj
+ */
+ public void removeObject( Object obj )
+ {
+ this.any.remove(obj);
+ }
/**
* Gets the value of the any property.
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/IDPSSODescriptorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/IDPSSODescriptorType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/IDPSSODescriptorType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -51,32 +51,98 @@
super(protocolSupport);
}
+ /**
+ * Add a SSO service
+ * @param endpt
+ */
public void addSingleSignOnService( EndpointType endpt)
{
this.singleSignOnService.add(endpt);
}
+ /**
+ * Add name id mapping service
+ * @param endpt
+ */
public void addNameIDMappingService( EndpointType endpt )
{
this.nameIDMappingService.add(endpt);
}
+ /**
+ * Add assertion id request service
+ * @param endpt
+ */
public void addAssertionIDRequestService( EndpointType endpt )
{
this.assertionIDRequestService.add(endpt);
}
+ /**
+ * Add attribute profile
+ * @param str
+ */
public void addAttributeProfile( String str )
{
this.attributeProfile.add( str );
}
+ /**
+ * Add attribute
+ * @param att
+ */
public void addAttribute( AttributeType att )
{
this.attribute.add(att);
}
+
+
+ /**
+ * Remove a SSO service
+ * @param endpt
+ */
+ public void removeSingleSignOnService( EndpointType endpt)
+ {
+ this.singleSignOnService.remove(endpt);
+ }
/**
+ * remove name id mapping service
+ * @param endpt
+ */
+ public void removeNameIDMappingService( EndpointType endpt )
+ {
+ this.nameIDMappingService.remove(endpt);
+ }
+
+ /**
+ * remove assertion id request service
+ * @param endpt
+ */
+ public void removeAssertionIDRequestService( EndpointType endpt )
+ {
+ this.assertionIDRequestService.remove(endpt);
+ }
+
+ /**
+ * Add attribute profile
+ * @param str
+ */
+ public void removeAttributeProfile( String str )
+ {
+ this.attributeProfile.remove( str );
+ }
+
+ /**
+ * Add attribute
+ * @param att
+ */
+ public void removeAttribute( AttributeType att )
+ {
+ this.attribute.remove(att);
+ }
+
+ /**
* Gets the value of the singleSignOnService property.
* <p>
* Objects of the following type(s) are allowed in the list
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/KeyDescriptorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/KeyDescriptorType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/KeyDescriptorType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -62,10 +62,23 @@
this.keyInfo = value;
}
+ /**
+ * Add encryption method type
+ * @param e
+ */
public void addEncryptionMethod( EncryptionMethodType e )
{
this.encryptionMethod.add( e );
}
+
+ /**
+ * Remove encryption method type
+ * @param e
+ */
+ public void removeEncryptionMethod( EncryptionMethodType e )
+ {
+ this.encryptionMethod.remove( e );
+ }
/**
* Gets the value of the encryptionMethod property.
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/OrganizationType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/OrganizationType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/OrganizationType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -38,22 +38,61 @@
protected List<LocalizedURIType> organizationURL = new ArrayList<LocalizedURIType>();
+ /**
+ * Add an organization name
+ * @param name
+ */
public void addOrganizationName( LocalizedNameType name )
{
this.organizationName.add(name);
}
+ /**
+ * Add organization display name
+ * @param name
+ */
public void addOrganizationDisplayName( LocalizedNameType name )
{
this.organizationDisplayName.add(name);
}
+ /**
+ * Add organization url
+ * @param uri
+ */
public void addOrganizationURL( LocalizedURIType uri )
{
this.organizationURL.add(uri);
}
+
+ /**
+ * remove an organization name
+ * @param name
+ */
+ public void removeOrganizationName( LocalizedNameType name )
+ {
+ this.organizationName.remove(name);
+ }
/**
+ * remove organization display name
+ * @param name
+ */
+ public void removeOrganizationDisplayName( LocalizedNameType name )
+ {
+ this.organizationDisplayName.remove(name);
+ }
+
+ /**
+ * remove organization url
+ * @param uri
+ */
+ public void removeOrganizationURL( LocalizedURIType uri )
+ {
+ this.organizationURL.remove(uri);
+ }
+
+ /**
* Gets the value of the extensions property.
*
* @return
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/PDPDescriptorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/PDPDescriptorType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/PDPDescriptorType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -40,22 +40,61 @@
super(protocolSupport);
}
+ /**
+ * Add authorization service
+ * @param endpt
+ */
public void addAuthZService( EndpointType endpt )
{
this.authzService.add(endpt);
}
+ /**
+ * Add assertion id request service
+ * @param endpt
+ */
public void addAssertionIDRequestService( EndpointType endpt )
{
this.assertionIDRequestService.add(endpt);
}
+ /**
+ * Add Name ID Format
+ * @param str
+ */
public void addNameIDFormat( String str )
{
this.nameIDFormat.add(str);
}
+
+ /**
+ * remove authorization service
+ * @param endpt
+ */
+ public void removeAuthZService( EndpointType endpt )
+ {
+ this.authzService.remove(endpt);
+ }
/**
+ * remove assertion id request service
+ * @param endpt
+ */
+ public void removeAssertionIDRequestService( EndpointType endpt )
+ {
+ this.assertionIDRequestService.remove(endpt);
+ }
+
+ /**
+ * remove Name ID Format
+ * @param str
+ */
+ public void removeNameIDFormat( String str )
+ {
+ this.nameIDFormat.remove(str);
+ }
+
+ /**
* Gets the value of the authzService property.
* <p>
* Objects of the following type(s) are allowed in the list
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/RoleDescriptorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/RoleDescriptorType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/RoleDescriptorType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -56,15 +56,41 @@
protocolSupportEnumeration.addAll( protocolSupport );
}
+ /**
+ * Add key descriptor
+ * @param keyD
+ */
public void addKeyDescriptor( KeyDescriptorType keyD )
{
this.keyDescriptor.add(keyD);
}
+ /**
+ * Add contact
+ * @param contact
+ */
public void addContactPerson( ContactType contact )
{
this.contactPerson.add(contact);
}
+
+ /**
+ * remove key descriptor
+ * @param keyD
+ */
+ public void removeKeyDescriptor( KeyDescriptorType keyD )
+ {
+ this.keyDescriptor.remove(keyD);
+ }
+
+ /**
+ * remove contact
+ * @param contact
+ */
+ public void removeContactPerson( ContactType contact )
+ {
+ this.contactPerson.remove(contact);
+ }
/**
* Gets the value of the signature property.
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/SPSSODescriptorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/SPSSODescriptorType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/SPSSODescriptorType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -39,6 +39,42 @@
{
super(protocolSupport);
}
+
+ /**
+ * Add an Assertion Consumer Service
+ * @param assertionConsumer an endpoint of type {@link IndexedEndpointType}
+ */
+ public void addAssertionConsumerService( IndexedEndpointType assertionConsumer )
+ {
+ this.assertionConsumerService.add( assertionConsumer );
+ }
+
+ /**
+ * Add an attribute consumer
+ * @param attributeConsumer an instance of type {@link AttributeConsumingServiceType}
+ */
+ public void addAttributeConsumerService( AttributeConsumingServiceType attributeConsumer )
+ {
+ this.attributeConsumingService.add( attributeConsumer );
+ }
+
+ /**
+ * Remove an Assertion Consumer Service
+ * @param assertionConsumer an endpoint of type {@link IndexedEndpointType}
+ */
+ public void removeAssertionConsumerService( IndexedEndpointType assertionConsumer )
+ {
+ this.assertionConsumerService.remove( assertionConsumer );
+ }
+
+ /**
+ * Remove an attribute consumer
+ * @param attributeConsumer an instance of type {@link AttributeConsumingServiceType}
+ */
+ public void removeAttributeConsumerService( AttributeConsumingServiceType attributeConsumer )
+ {
+ this.attributeConsumingService.remove( attributeConsumer );
+ }
/**
* Gets the value of the assertionConsumerService property.
@@ -50,6 +86,8 @@
{
return Collections.unmodifiableList( this.assertionConsumerService );
}
+
+
/**
* Gets the value of the attributeConsumingService property.
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/SSODescriptorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/SSODescriptorType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/SSODescriptorType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -40,27 +40,79 @@
super(protocolSupport);
}
+ /**
+ * Add SLO Service
+ * @param endpt
+ */
public void addSingleLogoutService( EndpointType endpt )
{
this.singleLogoutService.add(endpt);
}
+ /**
+ * Add atrifact resolution service
+ * @param i
+ */
public void addArtifactResolutionService( IndexedEndpointType i )
{
this.artifactResolutionService.add(i);
}
+ /**
+ * Add manage name id service
+ * @param end
+ */
public void addManageNameIDService( EndpointType end )
{
this.manageNameIDService.add(end);
}
+ /**
+ * Add Name ID Format
+ * @param s
+ */
public void addNameIDFormat( String s )
{
this.nameIDFormat.add(s);
}
+
+ /**
+ * remove SLO Service
+ * @param endpt
+ */
+ public void removeSingleLogoutService( EndpointType endpt )
+ {
+ this.singleLogoutService.remove(endpt);
+ }
/**
+ * remove atrifact resolution service
+ * @param i
+ */
+ public void removeArtifactResolutionService( IndexedEndpointType i )
+ {
+ this.artifactResolutionService.remove(i);
+ }
+
+ /**
+ * remove manage name id service
+ * @param end
+ */
+ public void removeManageNameIDService( EndpointType end )
+ {
+ this.manageNameIDService.remove(end);
+ }
+
+ /**
+ * remove Name ID Format
+ * @param s
+ */
+ public void removeNameIDFormat( String s )
+ {
+ this.nameIDFormat.remove(s);
+ }
+
+ /**
* Gets the value of the artifactResolutionService property.
* <p>
* Objects of the following type(s) are allowed in the list
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/TypeWithOtherAttributes.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/TypeWithOtherAttributes.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/metadata/TypeWithOtherAttributes.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -36,12 +36,27 @@
{
protected Map<QName, String> otherAttributes = new HashMap<QName, String>();
+ /**
+ * Add other attribute
+ * @param qame
+ * @param value
+ */
public void addOtherAttribute( QName qame, String value )
{
otherAttributes.put(qame, value);
}
/**
+ * Remove other attribute
+ * @param qame
+ * @param value
+ */
+ public void removeOtherAttribute( QName qame )
+ {
+ otherAttributes.remove( qame );
+ }
+
+ /**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
*
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/AssertionIDRequestType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/AssertionIDRequestType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/AssertionIDRequestType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -57,10 +57,23 @@
super(id, version, instant);
}
+ /**
+ * Add assertion id reference
+ * @param id
+ */
public void addAssertionIDRef( String id )
{
assertionIDRef.add( id );
}
+
+ /**
+ * remove assertion id reference
+ * @param id
+ */
+ public void removeAssertionIDRef( String id )
+ {
+ assertionIDRef.remove( id );
+ }
/**
* Gets the value of the assertionIDRef property.
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/AttributeQueryType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/AttributeQueryType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/AttributeQueryType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -60,12 +60,25 @@
super(id, version, instant);
}
+ /**
+ * Add an attribute
+ * @param att
+ */
public void add( AttributeType att )
{
this.attribute.add(att);
}
/**
+ * Remove an attribute
+ * @param att
+ */
+ public void remove( AttributeType att )
+ {
+ this.attribute.remove(att);
+ }
+
+ /**
* Gets the value of the attribute property.
*/
public List<AttributeType> getAttribute()
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/AuthzDecisionQueryType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/AuthzDecisionQueryType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/AuthzDecisionQueryType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -63,10 +63,23 @@
super(id, version, instant);
}
+ /**
+ * Add an action
+ * @param act
+ */
public void addAction( ActionType act )
{
this.action.add(act);
}
+
+ /**
+ * Remove an action
+ * @param act
+ */
+ public void removeAction( ActionType act )
+ {
+ this.action.remove(act);
+ }
/**
* Gets the value of the action property.
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/ExtensionsType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/ExtensionsType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/ExtensionsType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -48,10 +48,23 @@
{
protected List<Object> any = new ArrayList<Object>();
+ /**
+ * Add an extension
+ * @param extension
+ */
public void addExtension( Object extension )
{
any.add( extension );
}
+
+ /**
+ * Remove an extension
+ * @param extension
+ */
+ public void removeExtension( Object extension )
+ {
+ any.remove( extension );
+ }
/**
* Gets the value of the any property.
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/IDPListType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/IDPListType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/IDPListType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -52,10 +52,23 @@
protected List<IDPEntryType> idpEntry = new ArrayList<IDPEntryType>();
protected URI getComplete;
+ /**
+ * Add an idp entry
+ * @param entry
+ */
public void addIDPEntry( IDPEntryType entry )
{
this.idpEntry.add(entry);
}
+
+ /**
+ * Remove an idp entry
+ * @param entry
+ */
+ public void removeIDPEntry( IDPEntryType entry )
+ {
+ this.idpEntry.remove(entry);
+ }
/**
* Gets the value of the idpEntry property.
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/LogoutRequestType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/LogoutRequestType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/LogoutRequestType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -146,10 +146,23 @@
this.encryptedID = value;
}
+ /**
+ * Add session index
+ * @param index
+ */
public void addSessionIndex( String index )
{
this.sessionIndex.add( index );
}
+
+ /**
+ * Remove session index
+ * @param index
+ */
+ public void removeSessionIndex( String index )
+ {
+ this.sessionIndex.remove( index );
+ }
/**
* Gets the value of the sessionIndex property.
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/RequestedAuthnContextType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/RequestedAuthnContextType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/RequestedAuthnContextType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -52,17 +52,43 @@
protected List<String> authnContextDeclRef = new ArrayList<String>();
protected AuthnContextComparisonType comparison;
+ /**
+ * Add an authn Context class ref
+ * @param str
+ */
public void addAuthnContextClassRef( String str )
{
this.authnContextClassRef.add(str);
}
+ /**
+ * Add authn context decl ref
+ * @param str
+ */
public void addAuthnContextDeclRef( String str )
{
this.authnContextDeclRef.add(str);
}
+
+ /**
+ * Remove an authn Context class ref
+ * @param str
+ */
+ public void removeAuthnContextClassRef( String str )
+ {
+ this.authnContextClassRef.remove(str);
+ }
/**
+ * remove authn context decl ref
+ * @param str
+ */
+ public void removeAuthnContextDeclRef( String str )
+ {
+ this.authnContextDeclRef.remove(str);
+ }
+
+ /**
* Gets the value of the authnContextClassRef property.
*
*/
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/ResponseType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/ResponseType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/ResponseType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -53,10 +53,23 @@
{
protected List<RTChoiceType> assertions = new ArrayList<ResponseType.RTChoiceType>();
+ /**
+ * Add an assertion
+ * @param choice
+ */
public void addAssertion( RTChoiceType choice )
{
assertions.add(choice);
}
+
+ /**
+ * Remove an assertion
+ * @param choice
+ */
+ public void removeAssertion( RTChoiceType choice )
+ {
+ assertions.remove(choice);
+ }
/**
* Gets a read only list of assertions
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/ScopingType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/ScopingType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/ScopingType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -82,14 +82,7 @@
/**
* Gets the value of the requesterID property.
- *
* <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the requesterID property.
- *
- * <p>
* For example, to add a new item, do as follows:
* <pre>
* getRequesterID().add(newItem);
@@ -107,10 +100,23 @@
return Collections.unmodifiableList( this.requesterID );
}
+ /**
+ * Add requester id
+ * @param uri
+ */
public void addRequesterID( URI uri )
{
this.requesterID.add( uri );
}
+
+ /**
+ * Remove requester id
+ * @param uri
+ */
+ public void removeRequesterID( URI uri )
+ {
+ this.requesterID.remove( uri );
+ }
/**
* Gets the value of the proxyCount property.
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/StatusDetailType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/StatusDetailType.java 2011-01-27 12:40:34 UTC (rev 672)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/protocol/StatusDetailType.java 2011-01-27 16:42:24 UTC (rev 673)
@@ -49,13 +49,26 @@
{
protected List<Object> any = new ArrayList<Object>();
+ /**
+ * Add status detail
+ * @param obj
+ */
public void addStatusDetail( Object obj )
{
this.any.add( obj );
}
+
+ /**
+ * Remove status detail
+ * @param obj
+ */
+ public void removeStatusDetail( Object obj )
+ {
+ this.any.remove( obj );
+ }
/**
- * Gets the value of the any property.
+ * Gets the value of the any property. Read-Only list
*/
public List<Object> getAny()
{
13 years, 11 months