-
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
when using webauthn/passkeys, there is a limit in the used userid of 64 bytes
- Loading branch information
Showing
1 changed file
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
package dasniko.keycloak.user.flintstones.repo; | ||
|
||
import lombok.SneakyThrows; | ||
import org.keycloak.common.util.SecretGenerator; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.UUID; | ||
import java.util.stream.Collectors; | ||
|
||
/** | ||
|
@@ -16,12 +16,12 @@ public class FlintstonesRepository { | |
|
||
@SneakyThrows | ||
FlintstonesRepository() { | ||
users.add(new FlintstoneUser("66671638-b48a-4bab-8f37-d20efea42ce3", "[email protected]", "Fred", "Flintstone", true, List.of("stoneage"))); | ||
users.add(new FlintstoneUser("ced34250-cb88-4cc0-87e8-6fca25a926e3", "[email protected]", "Wilma", "Flintstone", true, List.of("stoneage"))); | ||
users.add(new FlintstoneUser("12df5d9c-c6ac-48e8-8086-b10ab7985a65", "[email protected]", "Pebbles", "Flintstone", true, List.of("stoneage"))); | ||
users.add(new FlintstoneUser("1b6c083b-3e14-40ef-897c-a0d3cdba22ed", "[email protected]", "Barney", "Rubble", true, List.of("stoneage"))); | ||
users.add(new FlintstoneUser("42c88684-c585-4d83-b748-7a49213c4690", "[email protected]", "Betty", "Rubble", true, null)); | ||
users.add(new FlintstoneUser("08950eb2-920b-48f5-bbe0-9694e8ad6fc4", "[email protected]", "Bam Bam", "Rubble", false, null)); | ||
users.add(new FlintstoneUser("12345", "[email protected]", "Fred", "Flintstone", true, List.of("stoneage"))); | ||
users.add(new FlintstoneUser("23456", "[email protected]", "Wilma", "Flintstone", true, List.of("stoneage"))); | ||
users.add(new FlintstoneUser("34567", "[email protected]", "Pebbles", "Flintstone", true, List.of("stoneage"))); | ||
users.add(new FlintstoneUser("45678", "[email protected]", "Barney", "Rubble", true, List.of("stoneage"))); | ||
users.add(new FlintstoneUser("56789", "[email protected]", "Betty", "Rubble", true, null)); | ||
users.add(new FlintstoneUser("67890", "[email protected]", "Bam Bam", "Rubble", false, null)); | ||
} | ||
|
||
List<FlintstoneUser> getAllUsers() { | ||
|
@@ -69,7 +69,7 @@ boolean updateCredentials(String id, String password) { | |
} | ||
|
||
void createUser(FlintstoneUser user) { | ||
user.setId(UUID.randomUUID().toString()); | ||
user.setId(SecretGenerator.getInstance().randomString(5)); | ||
user.setCreated(System.currentTimeMillis()); | ||
users.add(user); | ||
} | ||
|