KEYCLOAK-10780 Stop creating placeholder e-mails for service accounts (#228)
This commit is contained in:
parent
43e2370f21
commit
9a7c1a91a5
4 changed files with 2 additions and 4 deletions
|
@ -76,7 +76,6 @@
|
|||
{
|
||||
"username" : "service-account-product-sa-client",
|
||||
"enabled": true,
|
||||
"email" : "service-account-product-sa-client@placeholder.org",
|
||||
"serviceAccountClientId": "product-sa-client",
|
||||
"realmRoles": [ "user" ]
|
||||
}
|
||||
|
|
|
@ -164,7 +164,6 @@ public class ClientManager {
|
|||
// Don't use federation for service account user
|
||||
UserModel user = realmManager.getSession().userLocalStorage().addUser(client.getRealm(), username);
|
||||
user.setEnabled(true);
|
||||
user.setEmail(username + "@placeholder.org");
|
||||
user.setServiceAccountClientLink(client.getId());
|
||||
}
|
||||
|
||||
|
@ -205,7 +204,6 @@ public class ClientManager {
|
|||
if (serviceAccountUser != null) {
|
||||
String username = ServiceAccountConstants.SERVICE_ACCOUNT_USER_PREFIX + newClientId;
|
||||
serviceAccountUser.setUsername(username);
|
||||
serviceAccountUser.setEmail(username + "@placeholder.org");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -111,7 +111,6 @@
|
|||
{
|
||||
"username": "service-account-photoz-restful-api",
|
||||
"enabled": true,
|
||||
"email": "service-account-photoz-restful-api@placeholder.org",
|
||||
"serviceAccountClientId": "photoz-restful-api",
|
||||
"clientRoles": {
|
||||
"photoz-restful-api" : ["uma_protection"]
|
||||
|
|
|
@ -231,6 +231,8 @@ public class ClientTest extends AbstractAdminTest {
|
|||
response.close();
|
||||
UserRepresentation userRep = realm.clients().get(id).getServiceAccountUser();
|
||||
assertEquals("service-account-serviceclient", userRep.getUsername());
|
||||
// KEYCLOAK-11197 service accounts are no longer created with a placeholder e-mail.
|
||||
assertNull(userRep.getEmail());
|
||||
}
|
||||
|
||||
// KEYCLOAK-3421
|
||||
|
|
Loading…
Reference in a new issue