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.AuthenticationInfocreateAuthenticationInfo(String realm, User user) CreateAuthenticationInfofrom user and groups.voidStores the group in local database of scm-manager.voidStores 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
CreateAuthenticationInfofrom 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.