KEYCLOAK-8377 Role Attributes
This commit is contained in:
1 parent
460cdf4508
commit
9ef4c7fffd
33 files changed
+641
-45
No files matched your search
@@ -17,6 +17,8 @@
|
||||
|
||||
package org.keycloak.representations.idm;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -35,6 +37,7 @@ public class RoleRepresentation {
|
||||
protected Composites composites;
|
||||
private Boolean clientRole;
|
||||
private String containerId;
|
||||
protected Map<String, List<String>> attributes;
|
||||
|
||||
public static class Composites {
|
||||
protected Set<String> realm;
|
||||
@@ -138,4 +141,21 @@ public class RoleRepresentation {
|
||||
public void setContainerId(String containerId) {
|
||||
this.containerId = containerId;
|
||||
}
|
||||
|
||||
public Map<String, List<String>> getAttributes() {
|
||||
return attributes;
|
||||
}
|
||||
|
||||
public void setAttributes(Map<String, List<String>> attributes) {
|
||||
this.attributes = attributes;
|
||||
}
|
||||
|
||||
public RoleRepresentation singleAttribute(String name, String value) {
|
||||
if (attributes == null) {
|
||||
attributes = new HashMap<>();
|
||||
}
|
||||
|
||||
attributes.put(name, Arrays.asList(value));
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user