use of org.gluu.oxtrust.api.server.model.OxTrustJsonSetting in project oxTrust by GluuFederation.
the class OxTrustJsonSettingWebResource method getOxtrustJsonSettings.
@GET
@Operation(summary = "Get json oxtrust settings", description = "Get json oxtrust settings")
@ApiResponses(value = { @ApiResponse(responseCode = "200", content = @Content(schema = @Schema(implementation = OxTrustJsonSetting.class)), description = Constants.RESULT_SUCCESS), @ApiResponse(responseCode = "500", description = "Server error") })
@ProtectedApi(scopes = { READ_ACCESS })
public Response getOxtrustJsonSettings() {
try {
log(logger, "Processing oxtrust json settings retrival");
this.oxTrustappConfiguration = jsonConfigurationService.getOxTrustappConfiguration();
OxTrustJsonSetting setting = new OxTrustJsonSetting();
setting.setOrgName(this.oxTrustappConfiguration.getOrganizationName());
setting.setSupportEmail(this.oxTrustappConfiguration.getOrgSupportEmail());
setting.setAuthenticationRecaptchaEnabled(this.oxTrustappConfiguration.isAuthenticationRecaptchaEnabled());
setting.setCleanServiceInterval(this.oxTrustappConfiguration.getCleanServiceInterval());
setting.setEnforceEmailUniqueness(this.oxTrustappConfiguration.getEnforceEmailUniqueness());
setting.setPasswordResetRequestExpirationTime(this.oxTrustappConfiguration.getPasswordResetRequestExpirationTime());
setting.setLoggingLevel(this.oxTrustappConfiguration.getLoggingLevel());
return Response.ok(setting).build();
} catch (Exception e) {
log(logger, e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
}
}
Aggregations