use of org.jboss.resteasy.annotations.cache.NoCache in project keycloak by keycloak.
the class ServerInfoAdminResource method getInfo.
/**
* Get themes, social providers, auth providers, and event listeners available on this server
*
* @return
*/
@GET
@NoCache
@Produces(MediaType.APPLICATION_JSON)
public ServerInfoRepresentation getInfo() {
ServerInfoRepresentation info = new ServerInfoRepresentation();
info.setSystemInfo(SystemInfoRepresentation.create(session.getKeycloakSessionFactory().getServerStartupTimestamp()));
info.setMemoryInfo(MemoryInfoRepresentation.create());
info.setProfileInfo(ProfileInfoRepresentation.create());
setSocialProviders(info);
setIdentityProviders(info);
setThemes(info);
setProviders(info);
setProtocolMapperTypes(info);
setBuiltinProtocolMappers(info);
setClientInstallations(info);
setPasswordPolicies(info);
info.setEnums(ENUMS);
return info;
}
use of org.jboss.resteasy.annotations.cache.NoCache in project keycloak by keycloak.
the class IdentityProvidersResource method getIdentityProviders.
/**
* Get identity providers
*
* @param providerId Provider id
* @return
*/
@Path("/providers/{provider_id}")
@GET
@NoCache
@Produces(MediaType.APPLICATION_JSON)
public Response getIdentityProviders(@PathParam("provider_id") String providerId) {
this.auth.realm().requireViewIdentityProviders();
IdentityProviderFactory providerFactory = getProviderFactorytById(providerId);
if (providerFactory != null) {
return Response.ok(providerFactory).build();
}
return Response.status(BAD_REQUEST).build();
}
use of org.jboss.resteasy.annotations.cache.NoCache in project keycloak by keycloak.
the class ProtocolMappersResource method update.
/**
* Update the mapper
*
* @param id Mapper id
* @param rep
*/
@PUT
@NoCache
@Path("models/{id}")
@Consumes(MediaType.APPLICATION_JSON)
public void update(@PathParam("id") String id, ProtocolMapperRepresentation rep) {
managePermission.require();
ProtocolMapperModel model = client.getProtocolMapperById(id);
if (model == null)
throw new NotFoundException("Model not found");
model = RepresentationToModel.toModel(rep);
validateModel(model);
client.updateProtocolMapper(model);
adminEvent.operation(OperationType.UPDATE).resourcePath(session.getContext().getUri()).representation(rep).success();
}
use of org.jboss.resteasy.annotations.cache.NoCache in project keycloak by keycloak.
the class RoleByIdResource method getRealmRoleComposites.
/**
* Get realm-level roles that are in the role's composite
*
* @param id
* @return
*/
@Path("{role-id}/composites/realm")
@GET
@NoCache
@Produces(MediaType.APPLICATION_JSON)
public Stream<RoleRepresentation> getRealmRoleComposites(@PathParam("role-id") final String id) {
RoleModel role = getRoleModel(id);
auth.roles().requireView(role);
return getRealmRoleComposites(role);
}
use of org.jboss.resteasy.annotations.cache.NoCache in project keycloak by keycloak.
the class RoleByIdResource method getRole.
/**
* Get a specific role's representation
*
* @param id id of role
* @return
*/
@Path("{role-id}")
@GET
@NoCache
@Produces(MediaType.APPLICATION_JSON)
public RoleRepresentation getRole(@PathParam("role-id") final String id) {
RoleModel roleModel = getRoleModel(id);
auth.roles().requireView(roleModel);
return getRole(roleModel);
}
Aggregations