Skip to content

Commit 1a52bc8

Browse files
author
Gerald Unterrainer
committed
Merge branch 'develop'
2 parents 4c9cc1d + 3751239 commit 1a52bc8

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<modelVersion>4.0.0</modelVersion>
1919
<artifactId>http-server</artifactId>
20-
<version>0.2.14</version>
20+
<version>0.2.15</version>
2121
<name>HttpServer</name>
2222
<packaging>jar</packaging>
2323

src/main/java/info/unterrainer/commons/httpserver/accessmanager/HttpAccessManager.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ private TokenVerifier<AccessToken> persistUserInfoInContext(final Context ctx) {
194194
.email(token.getEmail())
195195
.emailVerified(token.getEmailVerified())
196196
.realmRoles(token.getRealmAccess().getRoles())
197-
.tenant(readTenants)
197+
.readTenants(readTenants)
198+
.writeTenants(writeTenants)
198199
.clientRoles(clientRoles)
199200
.isActive(token.isActive())
200201
.isBearer(token.getType().equalsIgnoreCase("bearer"))

src/main/java/info/unterrainer/commons/httpserver/jsons/UserDataJson.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ public class UserDataJson {
2323
private Set<String> realmRoles;
2424
private Set<String> clientRoles;
2525
/**
26-
* Is the custom Keycloak-attribute 'tenant' that has to be set under
27-
* user/attributes within Keycloak and then mapped using an AttributeMapper
28-
* within Keycloak as well. Is a comma-separated list of tenant-IDs.
26+
* Custom Keycloak-attributes 'tenant_read' and 'tenant_write' that have to be
27+
* set under user/attributes within Keycloak and then mapped using an
28+
* AttributeMapper within Keycloak as well. Are comma-separated lists of
29+
* tenant-IDs.
2930
*/
30-
private String tenant;
31+
private String readTenants;
32+
private String writeTenants;
3133

3234
private boolean isActive;
3335
private boolean isBearer;

0 commit comments

Comments
 (0)