public User findUserByKeycloakId ( UUID userId ) { AuthSource authSource = authSourceDAO . findByStrategy ( KEYCLOAK_AUTH_SOURCE ) ; if ( authSource == null ) { logger . error ( "Could not find Keycloak auth source" ) ; } UserIdentification userIdentification = userIdentificationDAO . findByExternalId ( userId . toString ( ) , authSource ) ; if ( userIdentification != null ) { return userIdentification . getUser ( ) ; } return null ; }
Finds user by Keycloak id