Class BaseKeyCloakManager
- java.lang.Object
-
- org.uberfire.ext.security.management.keycloak.BaseKeyCloakManager
-
- Direct Known Subclasses:
KeyCloakGroupManager,KeyCloakUserManager
public abstract class BaseKeyCloakManager extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringATTRIBUTE_USER_EMAILprotected static StringATTRIBUTE_USER_EMAIL_VERIFIEDprotected static StringATTRIBUTE_USER_ENABLEDprotected static StringATTRIBUTE_USER_FIRST_NAMEprotected static StringATTRIBUTE_USER_IDprotected static StringATTRIBUTE_USER_LAST_NAMEprotected ClientFactoryfactoryprotected static Collection<org.uberfire.ext.security.management.api.UserManager.UserAttribute>USER_ATTRIBUTESprotected static org.uberfire.ext.security.management.api.UserManager.UserAttributeUSER_EMAILprotected static org.uberfire.ext.security.management.api.UserManager.UserAttributeUSER_EMAIL_VERIFIEDprotected static org.uberfire.ext.security.management.api.UserManager.UserAttributeUSER_ENABLEDprotected static org.uberfire.ext.security.management.api.UserManager.UserAttributeUSER_FIST_NAMEprotected static org.uberfire.ext.security.management.api.UserManager.UserAttributeUSER_IDprotected static org.uberfire.ext.security.management.api.UserManager.UserAttributeUSER_LAST_NAME
-
Constructor Summary
Constructors Constructor Description BaseKeyCloakManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconsumeRealm(Consumer<RealmResource> consumer)protected org.jboss.errai.security.shared.api.GroupcreateGroup(String name)protected org.jboss.errai.security.shared.api.GroupcreateGroup(org.keycloak.representations.idm.RoleRepresentation roleRepresentation)protected org.jboss.errai.security.shared.api.identity.UsercreateUser(org.keycloak.representations.idm.UserRepresentation userRepresentation)protected org.jboss.errai.security.shared.api.identity.UsercreateUser(org.keycloak.representations.idm.UserRepresentation userRepresentation, Set<org.jboss.errai.security.shared.api.Group> groups, Set<org.jboss.errai.security.shared.api.Role> roles)protected voidfillUserAttributes(org.jboss.errai.security.shared.api.identity.User user, org.keycloak.representations.idm.UserRepresentation userRepresentation)protected voidfillUserRepresentationAttributes(org.jboss.errai.security.shared.api.identity.User user, org.keycloak.representations.idm.UserRepresentation userRepresentation)protected StringgetClientIdByName(RealmResource realmResource)protected KeycloakgetKeyCloakInstance()protected org.keycloak.representations.idm.RoleRepresentationgetRoleRepresentation(String name, RoleResource roleResource)protected RolesResourcegetRolesResource(RealmResource realmResource, boolean useClientRoles)protected RoleScopeResourcegetRolesScopeResource(RoleMappingResource roleMappingResource, boolean useClientRoles)protected org.uberfire.ext.security.management.api.AbstractEntityManager.SearchRequestgetSearchRequest(org.uberfire.ext.security.management.api.AbstractEntityManager.SearchRequest request)protected Set[]getUserGroupsAndRoles(RoleMappingResource roleMappingResource)protected UserResourcegetUserResource(UsersResource usersResource, String username)protected voidhandleResponse(org.jboss.resteasy.client.ClientResponse response)protected voidinit(ClientFactory factory)
-
-
-
Field Detail
-
ATTRIBUTE_USER_ID
protected static final String ATTRIBUTE_USER_ID
- See Also:
- Constant Field Values
-
ATTRIBUTE_USER_FIRST_NAME
protected static final String ATTRIBUTE_USER_FIRST_NAME
- See Also:
- Constant Field Values
-
ATTRIBUTE_USER_LAST_NAME
protected static final String ATTRIBUTE_USER_LAST_NAME
- See Also:
- Constant Field Values
-
ATTRIBUTE_USER_ENABLED
protected static final String ATTRIBUTE_USER_ENABLED
- See Also:
- Constant Field Values
-
ATTRIBUTE_USER_EMAIL
protected static final String ATTRIBUTE_USER_EMAIL
- See Also:
- Constant Field Values
-
ATTRIBUTE_USER_EMAIL_VERIFIED
protected static final String ATTRIBUTE_USER_EMAIL_VERIFIED
- See Also:
- Constant Field Values
-
USER_ID
protected static final org.uberfire.ext.security.management.api.UserManager.UserAttribute USER_ID
-
USER_FIST_NAME
protected static final org.uberfire.ext.security.management.api.UserManager.UserAttribute USER_FIST_NAME
-
USER_LAST_NAME
protected static final org.uberfire.ext.security.management.api.UserManager.UserAttribute USER_LAST_NAME
-
USER_ENABLED
protected static final org.uberfire.ext.security.management.api.UserManager.UserAttribute USER_ENABLED
-
USER_EMAIL
protected static final org.uberfire.ext.security.management.api.UserManager.UserAttribute USER_EMAIL
-
USER_EMAIL_VERIFIED
protected static final org.uberfire.ext.security.management.api.UserManager.UserAttribute USER_EMAIL_VERIFIED
-
USER_ATTRIBUTES
protected static final Collection<org.uberfire.ext.security.management.api.UserManager.UserAttribute> USER_ATTRIBUTES
-
factory
protected ClientFactory factory
-
-
Method Detail
-
init
protected void init(ClientFactory factory)
-
getKeyCloakInstance
protected Keycloak getKeyCloakInstance()
-
consumeRealm
protected void consumeRealm(Consumer<RealmResource> consumer)
-
getSearchRequest
protected org.uberfire.ext.security.management.api.AbstractEntityManager.SearchRequest getSearchRequest(org.uberfire.ext.security.management.api.AbstractEntityManager.SearchRequest request)
-
createUser
protected org.jboss.errai.security.shared.api.identity.User createUser(org.keycloak.representations.idm.UserRepresentation userRepresentation)
-
createUser
protected org.jboss.errai.security.shared.api.identity.User createUser(org.keycloak.representations.idm.UserRepresentation userRepresentation, Set<org.jboss.errai.security.shared.api.Group> groups, Set<org.jboss.errai.security.shared.api.Role> roles)
-
createGroup
protected org.jboss.errai.security.shared.api.Group createGroup(org.keycloak.representations.idm.RoleRepresentation roleRepresentation)
-
createGroup
protected org.jboss.errai.security.shared.api.Group createGroup(String name)
-
getUserGroupsAndRoles
protected Set[] getUserGroupsAndRoles(RoleMappingResource roleMappingResource)
-
fillUserAttributes
protected void fillUserAttributes(org.jboss.errai.security.shared.api.identity.User user, org.keycloak.representations.idm.UserRepresentation userRepresentation)
-
fillUserRepresentationAttributes
protected void fillUserRepresentationAttributes(org.jboss.errai.security.shared.api.identity.User user, org.keycloak.representations.idm.UserRepresentation userRepresentation)
-
getUserResource
protected UserResource getUserResource(UsersResource usersResource, String username)
-
getRoleRepresentation
protected org.keycloak.representations.idm.RoleRepresentation getRoleRepresentation(String name, RoleResource roleResource)
-
handleResponse
protected void handleResponse(org.jboss.resteasy.client.ClientResponse response)
-
getRolesResource
protected RolesResource getRolesResource(RealmResource realmResource, boolean useClientRoles)
-
getRolesScopeResource
protected RoleScopeResource getRolesScopeResource(RoleMappingResource roleMappingResource, boolean useClientRoles)
-
getClientIdByName
protected String getClientIdByName(RealmResource realmResource)
-
-