Package sonia.scm.security
Class SyncingRealmHelper
java.lang.Object
sonia.scm.security.SyncingRealmHelper
Helper class for syncing realms. The class should simplify the creation of realms, which are syncing authenticated
users with the local database.
- Since:
- 2.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionSyncingRealmHelper
(AdministrationContext ctx, UserManager userManager, GroupManager groupManager) Deprecated.SyncingRealmHelper
(AdministrationContext ctx, UserManager userManager, GroupManager groupManager, Set<ExternalUserConverter> externalUserConverters) Constructs a new SyncingRealmHelper. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.shiro.authc.AuthenticationInfo
createAuthenticationInfo
(String realm, User user) CreateAuthenticationInfo
from user and groups.void
Stores the group in local database of scm-manager.void
Stores the user in local database of scm-manager.
-
Constructor Details
-
SyncingRealmHelper
@Inject public SyncingRealmHelper(AdministrationContext ctx, UserManager userManager, GroupManager groupManager, Set<ExternalUserConverter> externalUserConverters) Constructs a new SyncingRealmHelper.- Parameters:
ctx
- administration contextuserManager
- user managergroupManager
- group managerexternalUserConverters
- global scm configuration
-
SyncingRealmHelper
@Deprecated public SyncingRealmHelper(AdministrationContext ctx, UserManager userManager, GroupManager groupManager) Deprecated.Constructs a new SyncingRealmHelper.- Parameters:
ctx
- administration contextuserManager
- user managergroupManager
- group manager
-
-
Method Details
-
createAuthenticationInfo
CreateAuthenticationInfo
from user and groups.- Parameters:
realm
- name of the realmuser
- authenticated user- Returns:
- authentication info
-
store
Stores the group in local database of scm-manager.- Parameters:
group
- group to store
-
store
Stores the user in local database of scm-manager.- Parameters:
user
- user to store
-
SyncingRealmHelper(AdministrationContext, UserManager, GroupManager, Set)
instead.