Comments (2)
Probably not worth a second issue but I'm seeing the same problem with 20.0.1 user-storage-jpa. Thanks in advance.
[ERROR] user-storage-jpa/src/main/java/org/keycloak/quickstart/storage/user/MyUserStorageProvider.java:[54,8] org.keycloak.quickstart.storage.user.MyUserStorageProvider is not abstract and does not override abstract method getUserByEmail(org.keycloak.models.RealmModel,java.lang.String) in org.keycloak.storage.user.UserLookupProvider [ERROR] user-storage-jpa/src/main/java/org/keycloak/quickstart/storage/user/MyUserStorageProvider.java:[95,5] method does not override or implement a method from a supertype [ERROR] user-storage-jpa/src/main/java/org/keycloak/quickstart/storage/user/MyUserStorageProvider.java:[107,5] method does not override or implement a method from a supertype [ERROR] user-storage-jpa/src/main/java/org/keycloak/quickstart/storage/user/MyUserStorageProvider.java:[121,5] method does not override or implement a method from a supertype [ERROR] user-storage-jpa/src/main/java/org/keycloak/quickstart/storage/user/MyUserStorageProvider.java:[190,5] method does not override or implement a method from a supertype [ERROR] user-storage-jpa/src/main/java/org/keycloak/quickstart/storage/user/MyUserStorageProvider.java:[231,5] method does not override or implement a method from a supertype [ERROR] user-storage-jpa/src/main/java/org/keycloak/quickstart/storage/user/MyUserStorageProvider.java:[236,5] method does not override or implement a method from a supertype [ERROR] user-storage-jpa/src/main/java/org/keycloak/quickstart/storage/user/MyUserStorageProvider.java:[252,5] method does not override or implement a method from a supertype [ERROR] user-storage-jpa/src/main/java/org/keycloak/quickstart/storage/user/MyUserStorageProvider.java:[257,5] method does not override or implement a method from a supertype [ERROR] user-storage-jpa/src/main/java/org/keycloak/quickstart/storage/user/MyUserStorageProvider.java:[273,5] method does not override or implement a method from a supertype [ERROR] user-storage-jpa/src/main/java/org/keycloak/quickstart/storage/user/MyUserStorageProvider.java:[278,5] method does not override or implement a method from a supertype [ERROR] user-storage-jpa/src/main/java/org/keycloak/quickstart/storage/user/MyUserStorageProvider.java:[283,5] method does not override or implement a method from a supertype [ERROR] user-storage-jpa/src/main/java/org/keycloak/quickstart/storage/user/MyUserStorageProvider.java:[288,5] method does not override or implement a method from a supertype [ERROR] user-storage-jpa/src/main/java/org/keycloak/quickstart/storage/user/MyUserStorageProvider.java:[293,5] method does not override or implement a method from a supertype
from keycloak-quickstarts.
I was able to figure it out thanks to dasniko's keycloak-extensions-demo user-storage
How I solved it:
I commented out invalid overrides mentioned in my post above and added
`
@Override
public Stream<UserModel> getGroupMembersStream(RealmModel realm, GroupModel group, Integer firstResult, Integer maxResults){
return Stream.empty();
}
@Override
public Stream<UserModel> searchForUserByUserAttributeStream(RealmModel realm, String attrName, String attrValue){
return Stream.empty();
}
@Override
public Stream<String> getDisableableCredentialTypesStream(RealmModel realm, UserModel user){
return Stream.empty();
}
private Stream<UserModel> toUserModelStream(List<UserEntity> users, RealmModel realm) {
logger.debugf("Received {} users from provider", users.size());
return users.stream().map(user -> new MembersAdapter(session, realm, model, user));
}
@Override
public Stream<UserModel> searchForUserStream(RealmModel realm, String search, Integer firstResult, Integer maxResults){
logger.debugf("searchForUserStream, search={}, first={}, max={}", search, firstResult, maxResults);
//return Stream.empty();
TypedQuery<UserEntity> query = em.createNamedQuery("searchForUser", UserEntity.class);
query.setParameter("search", "%" + search.toLowerCase() + "%");
if (firstResult != -1) {
query.setFirstResult(firstResult);
}
if (maxResults != -1) {
query.setMaxResults(maxResults);
}
List<UserEntity> users = query.getResultList();
return toUserModelStream(users, realm);
}
@Override
public Stream<UserModel> searchForUserStream(RealmModel realm, Map<String, String> params, Integer firstResult, Integer maxResults){
//return Stream.empty();
logger.debugf("searchForUserStream, params={}, first={}, max={}", params, firstResult, maxResults);
TypedQuery<UserEntity> query = em.createNamedQuery("searchForUser", UserEntity.class);
query.setParameter("search", "%" );
if (firstResult != -1) {
query.setFirstResult(firstResult);
}
if (maxResults != -1) {
query.setMaxResults(maxResults);
}
List<UserEntity> users = query.getResultList();
return toUserModelStream(users, realm);
}`
from keycloak-quickstarts.
Related Issues (20)
- `action-token-authenticator` and `action-token-required-action` broken
- ExtendAccountConsoleTest fails on main
- Where is the old authenticator example? HOT 1
- Changes in account extension sample not working
- Failures in `ExtendAdminConsoleTest`
- Kubernetes quick start still uses "proxy" option
- After updating from 24.0.5 to 25.0.0, the admin UI not showing because of CORS check. HOT 1
- Make sure contributors not send PR to the `latest` branch
- Build fails in the extension
- Tests in user-storage-simple quickstart are failing in main branch
- Custom User Storage Provider JPA runtime provided properties HOT 1
- Jboss 8: Required mechanism KEYCLOAK-SAML not available, even though keycloak-saml-adapter is installed HOT 1
- Action-token quickstarts don't compile with latest Keycloak HOT 1
- Incorrect Keycloak version in the main branch of quickstarts
- K8s Service.type: ClusterIP Does Not Redirect Correctly
- Get rid of PhantomJS in tests
- extend-admin-console-node should be renamed "account-console"
- Update dependency on keycloak-client in main branch to 999.0.0-SNAPSHOT
- Figure what to do with keycloak-test-helper and update quickstarts accordingly
- CI is borked
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keycloak-quickstarts.