remove groups from BearerRealm / SyncRealmHelper / DAORealmHelper

This commit is contained in:
Eduard Heimbuch
2019-08-01 15:43:12 +02:00
parent 48821c7419
commit 86af7b23eb
9 changed files with 80 additions and 104 deletions

View File

@@ -90,12 +90,10 @@ class BearerRealmTest {
Set<String> groups = ImmutableSet.of("HeartOfGold", "Puzzle42");
when(accessToken.getSubject()).thenReturn("trillian");
when(accessToken.getGroups()).thenReturn(groups);
when(accessToken.getClaims()).thenReturn(new HashMap<>());
when(accessTokenResolver.resolve(bearerToken)).thenReturn(accessToken);
when(realmHelper.authenticationInfoBuilder("trillian")).thenReturn(builder);
when(builder.withGroups(groups)).thenReturn(builder);
when(builder.withCredentials("__bearer__")).thenReturn(builder);
when(builder.withScope(any(Scope.class))).thenReturn(builder);
when(builder.build()).thenReturn(authenticationInfo);