-
Notifications
You must be signed in to change notification settings - Fork 478
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #666 from naver/release/3.5.2
3.5.2 RELEASE Reviewed by : geunwoo
- Loading branch information
Showing
56 changed files
with
2,402 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
ngrinder-controller/src/main/java/org/ngrinder/common/constant/LdapConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (c) 2012-present NAVER Corp. | ||
* | ||
* This file is part of The nGrinder software distribution. Refer to | ||
* the file LICENSE which is part of The nGrinder distribution for | ||
* licensing details. The nGrinder distribution is available on the | ||
* Internet at https://naver.github.io/ngrinder | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.ngrinder.common.constant; | ||
|
||
public interface LdapConstants { | ||
String PROP_LDAP_ENABLED = "ldap.enabled"; | ||
String PROP_LDAP_SERVER = "ldap.server"; | ||
String PROP_LDAP_PORT = "ldap.port"; | ||
String PROP_LDAP_BASE_DN = "ldap.base.dn"; | ||
String PROP_LDAP_USER_SEARCH_BASE = "ldap.user.search.base"; | ||
String PROP_LDAP_USER_SEARCH_FILTER = "ldap.user.search.filter"; | ||
String PROP_LDAP_USER_DISPLAY_NAME = "ldap.user.display_name"; | ||
String PROP_LDAP_USER_EMAIL = "ldap.user.email"; | ||
String PROP_LDAP_MANAGER_DN = "ldap.manager.dn"; | ||
String PROP_LDAP_MANAGER_PASSWORD = "ldap.manager.password"; | ||
String PROP_LDAP_CONNECT_TIMEOUT = "ldap.connect.timeout"; | ||
String PROP_LDAP_RESPONSE_TIMEOUT = "ldap.response.timeout"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
ngrinder-controller/src/main/java/org/ngrinder/infra/config/JacksonConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright (c) 2012-present NAVER Corp. | ||
* | ||
* This file is part of The nGrinder software distribution. Refer to | ||
* the file LICENSE which is part of The nGrinder distribution for | ||
* licensing details. The nGrinder distribution is available on the | ||
* Internet at https://naver.github.io/ngrinder | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.ngrinder.infra.config; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import java.text.SimpleDateFormat; | ||
|
||
@Configuration | ||
public class JacksonConfig { | ||
@Bean | ||
public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() { | ||
return customizer -> { | ||
customizer.serializationInclusion(JsonInclude.Include.NON_NULL); | ||
customizer.indentOutput(true); | ||
customizer.timeZone("GMT"); | ||
customizer.dateFormat(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")); | ||
customizer.modules(new NumberModule()); | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
...-controller/src/main/java/org/ngrinder/infra/webhook/controller/WebhookApiController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
* Copyright (c) 2012-present NAVER Corp. | ||
* | ||
* This file is part of The nGrinder software distribution. Refer to | ||
* the file LICENSE which is part of The nGrinder distribution for | ||
* licensing details. The nGrinder distribution is available on the | ||
* Internet at https://naver.github.io/ngrinder | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.ngrinder.infra.webhook.controller; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import org.ngrinder.infra.webhook.model.WebhookActivation; | ||
import org.ngrinder.infra.webhook.model.WebhookConfig; | ||
import org.ngrinder.infra.webhook.service.WebhookActivationService; | ||
import org.ngrinder.infra.webhook.service.WebhookConfigService; | ||
import org.ngrinder.infra.webhook.service.WebhookService; | ||
import org.ngrinder.model.User; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.data.web.PageableDefault; | ||
import org.springframework.web.bind.annotation.*; | ||
|
||
import java.util.List; | ||
|
||
import static org.ngrinder.infra.webhook.model.Event.FINISH; | ||
|
||
@RestController | ||
@RequiredArgsConstructor | ||
@RequestMapping("/webhook/api") | ||
public class WebhookApiController { | ||
|
||
private final WebhookConfigService webhookConfigService; | ||
|
||
private final WebhookService webhookService; | ||
|
||
private final WebhookActivationService webhookActivationService; | ||
|
||
@PostMapping | ||
public void save(@RequestBody WebhookConfig webhookConfig) { | ||
webhookConfigService.save(webhookConfig); | ||
} | ||
|
||
@PostMapping("/validate") | ||
public void validatePayloadUrl(User user, @RequestBody WebhookConfig webhookConfig) { | ||
webhookService.sendDummyWebhookRequest(user, webhookConfig, FINISH); | ||
} | ||
|
||
@GetMapping | ||
public WebhookConfig getOne(User user) { | ||
return webhookConfigService.getOne(user.getUserId()); | ||
} | ||
|
||
@GetMapping("/activation") | ||
public List<WebhookActivation> getActivations(@RequestParam String createdUserId, | ||
@PageableDefault Pageable pageable) { | ||
return webhookActivationService.findAll(createdUserId, pageable); | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
...der-controller/src/main/java/org/ngrinder/infra/webhook/controller/WebhookController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright (c) 2012-present NAVER Corp. | ||
* | ||
* This file is part of The nGrinder software distribution. Refer to | ||
* the file LICENSE which is part of The nGrinder distribution for | ||
* licensing details. The nGrinder distribution is available on the | ||
* Internet at https://naver.github.io/ngrinder | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.ngrinder.infra.webhook.controller; | ||
|
||
import org.ngrinder.common.controller.annotation.GlobalControllerModel; | ||
import org.ngrinder.model.User; | ||
import org.springframework.stereotype.Controller; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
|
||
@Controller | ||
@GlobalControllerModel | ||
@RequestMapping("/webhook") | ||
public class WebhookController { | ||
|
||
@GetMapping("/settings") | ||
public String webhookSettings(User user) { | ||
return "app"; | ||
} | ||
} |
Oops, something went wrong.