Search in sources :

Example 1 with GroupProvider

use of org.apache.qpid.server.model.GroupProvider in project qpid-broker-j by apache.

the class UserPreferencesTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    _configuredObject = mock(ConfiguredObject.class);
    _preferenceStore = mock(PreferenceStore.class);
    _preferenceTaskExecutor = new CurrentThreadTaskExecutor();
    _preferenceTaskExecutor.start();
    _userPreferences = new UserPreferencesImpl(_preferenceTaskExecutor, _configuredObject, _preferenceStore, Collections.<Preference>emptyList());
    _groupPrincipal = new GroupPrincipal(MYGROUP, (GroupProvider) null);
    _owner = new AuthenticatedPrincipal(new UsernamePrincipal(MYUSER, null));
    _subject = new Subject(true, Sets.newHashSet(_owner, _groupPrincipal), Collections.emptySet(), Collections.emptySet());
    _testId = UUID.randomUUID();
}
Also used : UsernamePrincipal(org.apache.qpid.server.security.auth.UsernamePrincipal) GroupPrincipal(org.apache.qpid.server.security.group.GroupPrincipal) CurrentThreadTaskExecutor(org.apache.qpid.server.configuration.updater.CurrentThreadTaskExecutor) ConfiguredObject(org.apache.qpid.server.model.ConfiguredObject) GroupProvider(org.apache.qpid.server.model.GroupProvider) PreferenceStore(org.apache.qpid.server.store.preferences.PreferenceStore) Subject(javax.security.auth.Subject) AuthenticatedPrincipal(org.apache.qpid.server.security.auth.AuthenticatedPrincipal)

Aggregations

Subject (javax.security.auth.Subject)1 CurrentThreadTaskExecutor (org.apache.qpid.server.configuration.updater.CurrentThreadTaskExecutor)1 ConfiguredObject (org.apache.qpid.server.model.ConfiguredObject)1 GroupProvider (org.apache.qpid.server.model.GroupProvider)1 AuthenticatedPrincipal (org.apache.qpid.server.security.auth.AuthenticatedPrincipal)1 UsernamePrincipal (org.apache.qpid.server.security.auth.UsernamePrincipal)1 GroupPrincipal (org.apache.qpid.server.security.group.GroupPrincipal)1 PreferenceStore (org.apache.qpid.server.store.preferences.PreferenceStore)1