File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
src/main/kotlin/club/anifox/backend Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ class KeycloakService(
3434
3535 fun findByUserID (id : String ): UserRepresentation ? =
3636 try {
37+ println (" ZXCXZ = $realm " )
3738 keycloak
3839 .realm(realm)
3940 .users()
Original file line number Diff line number Diff line change @@ -16,8 +16,9 @@ class UserUtils(
1616) {
1717 fun checkUser (token : String ): UserTable {
1818 val keycloakUser = keycloakService.findByUserID(tokenHelper.getTokenInfo(token).sub!! )
19+
1920 return if (keycloakUser != null ) {
20- userRepository.findById(tokenHelper.getTokenInfo(token).preferredUsername !! )
21+ userRepository.findById(tokenHelper.getTokenInfo(token).sub !! )
2122 .orElseThrow { throw NotFoundException (" User not found" ) }
2223 } else {
2324 throw NotFoundException (" User not found" )
You canβt perform that action at this time.
0 commit comments