Reduce log in UserFederationResource
This commit is contained in:
parent
46d118207a
commit
55d614fce8
1 changed files with 1 additions and 9 deletions
|
@ -66,7 +66,6 @@ public class UserFederationResource {
|
||||||
@Path("providers")
|
@Path("providers")
|
||||||
@Produces("application/json")
|
@Produces("application/json")
|
||||||
public List<UserFederationProviderFactoryRepresentation> getProviders() {
|
public List<UserFederationProviderFactoryRepresentation> getProviders() {
|
||||||
logger.info("get provider list");
|
|
||||||
auth.requireView();
|
auth.requireView();
|
||||||
List<UserFederationProviderFactoryRepresentation> providers = new LinkedList<UserFederationProviderFactoryRepresentation>();
|
List<UserFederationProviderFactoryRepresentation> providers = new LinkedList<UserFederationProviderFactoryRepresentation>();
|
||||||
for (ProviderFactory factory : session.getKeycloakSessionFactory().getProviderFactories(UserFederationProvider.class)) {
|
for (ProviderFactory factory : session.getKeycloakSessionFactory().getProviderFactories(UserFederationProvider.class)) {
|
||||||
|
@ -75,7 +74,6 @@ public class UserFederationResource {
|
||||||
rep.setOptions(((UserFederationProviderFactory)factory).getConfigurationOptions());
|
rep.setOptions(((UserFederationProviderFactory)factory).getConfigurationOptions());
|
||||||
providers.add(rep);
|
providers.add(rep);
|
||||||
}
|
}
|
||||||
logger.info("provider list.size() " + providers.size());
|
|
||||||
return providers;
|
return providers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,7 +87,6 @@ public class UserFederationResource {
|
||||||
@Path("providers/{id}")
|
@Path("providers/{id}")
|
||||||
@Produces("application/json")
|
@Produces("application/json")
|
||||||
public UserFederationProviderFactoryRepresentation getProvider(@PathParam("id") String id) {
|
public UserFederationProviderFactoryRepresentation getProvider(@PathParam("id") String id) {
|
||||||
logger.info("get provider list");
|
|
||||||
auth.requireView();
|
auth.requireView();
|
||||||
for (ProviderFactory factory : session.getKeycloakSessionFactory().getProviderFactories(UserFederationProvider.class)) {
|
for (ProviderFactory factory : session.getKeycloakSessionFactory().getProviderFactories(UserFederationProvider.class)) {
|
||||||
if (!factory.getId().equals(id)) {
|
if (!factory.getId().equals(id)) {
|
||||||
|
@ -113,7 +110,6 @@ public class UserFederationResource {
|
||||||
@Path("instances")
|
@Path("instances")
|
||||||
@Consumes("application/json")
|
@Consumes("application/json")
|
||||||
public Response createProviderInstance(UserFederationProviderRepresentation rep) {
|
public Response createProviderInstance(UserFederationProviderRepresentation rep) {
|
||||||
logger.info("createProvider");
|
|
||||||
auth.requireManage();
|
auth.requireManage();
|
||||||
String displayName = rep.getDisplayName();
|
String displayName = rep.getDisplayName();
|
||||||
if (displayName != null && displayName.trim().equals("")) {
|
if (displayName != null && displayName.trim().equals("")) {
|
||||||
|
@ -136,7 +132,6 @@ public class UserFederationResource {
|
||||||
@Path("instances/{id}")
|
@Path("instances/{id}")
|
||||||
@Consumes("application/json")
|
@Consumes("application/json")
|
||||||
public void updateProviderInstance(@PathParam("id") String id, UserFederationProviderRepresentation rep) {
|
public void updateProviderInstance(@PathParam("id") String id, UserFederationProviderRepresentation rep) {
|
||||||
logger.info("updateProvider");
|
|
||||||
auth.requireManage();
|
auth.requireManage();
|
||||||
String displayName = rep.getDisplayName();
|
String displayName = rep.getDisplayName();
|
||||||
if (displayName != null && displayName.trim().equals("")) {
|
if (displayName != null && displayName.trim().equals("")) {
|
||||||
|
@ -158,7 +153,6 @@ public class UserFederationResource {
|
||||||
@Path("instances/{id}")
|
@Path("instances/{id}")
|
||||||
@Produces("application/json")
|
@Produces("application/json")
|
||||||
public UserFederationProviderRepresentation getProviderInstance(@PathParam("id") String id) {
|
public UserFederationProviderRepresentation getProviderInstance(@PathParam("id") String id) {
|
||||||
logger.info("getProvider");
|
|
||||||
auth.requireView();
|
auth.requireView();
|
||||||
for (UserFederationProviderModel model : realm.getUserFederationProviders()) {
|
for (UserFederationProviderModel model : realm.getUserFederationProviders()) {
|
||||||
if (model.getId().equals(id)) {
|
if (model.getId().equals(id)) {
|
||||||
|
@ -176,7 +170,6 @@ public class UserFederationResource {
|
||||||
@DELETE
|
@DELETE
|
||||||
@Path("instances/{id}")
|
@Path("instances/{id}")
|
||||||
public void deleteProviderInstance(@PathParam("id") String id) {
|
public void deleteProviderInstance(@PathParam("id") String id) {
|
||||||
logger.info("deleteProvider");
|
|
||||||
auth.requireManage();
|
auth.requireManage();
|
||||||
UserFederationProviderModel model = new UserFederationProviderModel(id, null, null, -1, null, -1, -1, 0);
|
UserFederationProviderModel model = new UserFederationProviderModel(id, null, null, -1, null, -1, -1, 0);
|
||||||
realm.removeUserFederationProvider(model);
|
realm.removeUserFederationProvider(model);
|
||||||
|
@ -194,7 +187,6 @@ public class UserFederationResource {
|
||||||
@Produces("application/json")
|
@Produces("application/json")
|
||||||
@NoCache
|
@NoCache
|
||||||
public List<UserFederationProviderRepresentation> getUserFederationInstances() {
|
public List<UserFederationProviderRepresentation> getUserFederationInstances() {
|
||||||
logger.info("getUserFederationInstances");
|
|
||||||
auth.requireManage();
|
auth.requireManage();
|
||||||
List<UserFederationProviderRepresentation> reps = new LinkedList<UserFederationProviderRepresentation>();
|
List<UserFederationProviderRepresentation> reps = new LinkedList<UserFederationProviderRepresentation>();
|
||||||
for (UserFederationProviderModel model : realm.getUserFederationProviders()) {
|
for (UserFederationProviderModel model : realm.getUserFederationProviders()) {
|
||||||
|
@ -213,7 +205,7 @@ public class UserFederationResource {
|
||||||
@Path("sync/{id}")
|
@Path("sync/{id}")
|
||||||
@NoCache
|
@NoCache
|
||||||
public Response syncUsers(@PathParam("id") String providerId, @QueryParam("action") String action) {
|
public Response syncUsers(@PathParam("id") String providerId, @QueryParam("action") String action) {
|
||||||
logger.info("triggerSync");
|
logger.debug("Syncing users");
|
||||||
auth.requireManage();
|
auth.requireManage();
|
||||||
|
|
||||||
for (UserFederationProviderModel model : realm.getUserFederationProviders()) {
|
for (UserFederationProviderModel model : realm.getUserFederationProviders()) {
|
||||||
|
|
Loading…
Reference in a new issue