Commit 71b35b1d authored by fabio martelli's avatar fabio martelli

merged changes

parents 663399b2 cb64a3eb
......@@ -160,7 +160,7 @@ limitations under the License.
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>0.11</version>
<version>0.12</version>
<configuration>
<excludes>
<exclude>nbactions.xml</exclude>
......
......@@ -31,9 +31,11 @@ public class EndUser implements Serializable {
private boolean active = true;
private final Set<String> choreographies = new HashSet<>();
private final Set<String> groups = new HashSet<>();
private final Set<String> choreographies = new HashSet<>();
private final Map<String, ServiceCredentials> serviceCredentials = new HashMap<>();
private final Map<String, Set<String>> attributes = new HashMap<>();
......@@ -61,12 +63,16 @@ public class EndUser implements Serializable {
this.password = password;
}
public Set<String> getChoreographies() {
return choreographies;
}
public Set<String> getGroups() {
return groups;
}
public Set<String> getChoreographies() {
return choreographies;
public Map<String, ServiceCredentials> getServiceCredentials() {
return serviceCredentials;
}
public Map<String, Set<String>> getAttributes() {
......
/*
* Copyright 2015 The CHOReVOLUTION project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package eu.chorevolution.idm.connid.federationserver.api;
import java.io.Serializable;
public class ServiceCredentials implements Serializable {
private static final long serialVersionUID = 5267708910761478567L;
private String username;
private String password;
public String getUsername() {
return username;
}
public void setUsername(final String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(final String password) {
this.password = password;
}
}
......@@ -20,6 +20,7 @@ package eu.chorevolution.idm.connid.federationserver;
import eu.chorevolution.idm.connid.federationserver.api.EndUser;
import eu.chorevolution.idm.connid.federationserver.api.FederationServerEndUserService;
import eu.chorevolution.idm.connid.federationserver.api.ServiceCredentials;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
......@@ -37,11 +38,22 @@ public class TestFederationServerEndUserService implements FederationServerEndUs
endUser.setUsername(DEFAULT_USERNAME);
endUser.setPassword("password");
endUser.setActive(true);
endUser.getChoreographies().add("wp5");
endUser.getGroups().add("group1");
endUser.getGroups().add("group2");
endUser.getAttributes().put("attr1", CollectionUtil.newSet("value1", "value2"));
endUser.getAttributes().put("attr2", CollectionUtil.newSet("value3", "value4"));
ServiceCredentials sc1 = new ServiceCredentials();
sc1.setUsername("sc1_" + DEFAULT_USERNAME);
sc1.setPassword("password1");
endUser.getServiceCredentials().put("sc1", sc1);
ServiceCredentials sc2 = new ServiceCredentials();
sc2.setUsername("sc2_" + DEFAULT_USERNAME);
sc2.setPassword("password2");
endUser.getServiceCredentials().put("sc3", sc2);
this.endusers.put(endUser.getUsername(), endUser);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment