mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-21 21:25:38 +00:00
bug6097: apply same mechanism for user creation per IP locking as for failed bearer token-based authentication
This commit is contained in:
+1
-1
@@ -63,7 +63,7 @@ public class LeagueEventHierarchyOwnershipChangeTest {
|
||||
securityService = new SecurityBundleTestWrapper().initializeSecurityServiceForTesting();
|
||||
Mockito.doReturn(securityService).when(service).getSecurityService();
|
||||
securityService.createSimpleUser(USERNAME, "a@b.c", PASSWORD, "The User", "SAP SE",
|
||||
/* validation URL */ Locale.ENGLISH, null, null);
|
||||
/* validation URL */ Locale.ENGLISH, null, null, /* clientIP */ null);
|
||||
}
|
||||
|
||||
@Before
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ public class TaggingServiceTest {
|
||||
securityService = new SecurityBundleTestWrapper().initializeSecurityServiceForTesting();
|
||||
// create & login user
|
||||
securityService.createSimpleUser(username, email, password, fullName, company, Locale.ENGLISH, null,
|
||||
securityService.getDefaultTenantForCurrentUser());
|
||||
securityService.getDefaultTenantForCurrentUser(), /* clientIP */ null);
|
||||
ThreadContext.unbindSubject(); // ensure that a new subject is created that knows the current security manager
|
||||
subject = SecurityUtils.getSubject(); // this also binds the Subject to the ThreadContext
|
||||
subject.login(new UsernamePasswordToken(username, password));
|
||||
|
||||
Reference in New Issue
Block a user