Package de.trustable.ca3s.core.web.rest
Class AcmeChallengeResource
- java.lang.Object
-
- de.trustable.ca3s.core.web.rest.AcmeChallengeResource
-
@RestController @RequestMapping("/api") public class AcmeChallengeResource extends ObjectREST controller for managingAcmeChallenge.
-
-
Constructor Summary
Constructors Constructor Description AcmeChallengeResource(AcmeChallengeService acmeChallengeService, ChallengeController challengeController, JWSService jwsService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<AcmeChallenge>createAcmeChallenge(@Valid AcmeChallenge acmeChallenge)POST /acme-challenges: Create a new acmeChallenge.org.springframework.http.ResponseEntity<Void>deleteAcmeChallenge(Long id)DELETE /acme-challenges/:id: delete the "id" acmeChallenge.org.springframework.http.ResponseEntity<AcmeChallenge>getAcmeChallenge(Long id)GET /acme-challenges/:id: get the "id" acmeChallenge.List<AcmeChallenge>getAllAcmeChallenges()GET /acme-challenges: get all the acmeChallenges.org.springframework.http.ResponseEntity<?>postPendingAcmeChallenges(@Valid String body, String accept, Long requestProxyId){@code POST /acme-challenges/pending/request-proxy-configs/{requestProxyId} : get all pending AcmeChallenges for a given realm.org.springframework.http.ResponseEntity<Void>processChallengeValidation(@Valid String body, String accept)POST /acme-challenges/validation: process a proxy-validated acmeChallenge.org.springframework.http.ResponseEntity<AcmeChallenge>updateAcmeChallenge(@Valid AcmeChallenge acmeChallenge)PUT /acme-challenges: Updates an existing acmeChallenge.
-
-
-
Constructor Detail
-
AcmeChallengeResource
public AcmeChallengeResource(AcmeChallengeService acmeChallengeService, ChallengeController challengeController, JWSService jwsService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Detail
-
createAcmeChallenge
@PostMapping("/acme-challenges") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<AcmeChallenge> createAcmeChallenge(@Valid @RequestBody @Valid AcmeChallenge acmeChallenge) throws URISyntaxExceptionPOST /acme-challenges: Create a new acmeChallenge.- Parameters:
acmeChallenge- the acmeChallenge to create.- Returns:
- the
ResponseEntitywith status201 (Created)and with body the new acmeChallenge, or with status400 (Bad Request)if the acmeChallenge has already an ID. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
updateAcmeChallenge
@PutMapping("/acme-challenges") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<AcmeChallenge> updateAcmeChallenge(@Valid @RequestBody @Valid AcmeChallenge acmeChallenge) throws URISyntaxExceptionPUT /acme-challenges: Updates an existing acmeChallenge.- Parameters:
acmeChallenge- the acmeChallenge to update.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the updated acmeChallenge, or with status400 (Bad Request)if the acmeChallenge is not valid, or with status500 (Internal Server Error)if the acmeChallenge couldn't be updated. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
getAllAcmeChallenges
@GetMapping("/acme-challenges") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public List<AcmeChallenge> getAllAcmeChallenges()GET /acme-challenges: get all the acmeChallenges.- Returns:
- the
ResponseEntitywith status200 (OK)and the list of acmeChallenges in body.
-
getAcmeChallenge
@GetMapping("/acme-challenges/{id}") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<AcmeChallenge> getAcmeChallenge(@PathVariable Long id)GET /acme-challenges/:id: get the "id" acmeChallenge.- Parameters:
id- the id of the acmeChallenge to retrieve.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the acmeChallenge, or with status404 (Not Found).
-
deleteAcmeChallenge
@DeleteMapping("/acme-challenges/{id}") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<Void> deleteAcmeChallenge(@PathVariable Long id)DELETE /acme-challenges/:id: delete the "id" acmeChallenge.- Parameters:
id- the id of the acmeChallenge to delete.- Returns:
- the
ResponseEntitywith status204 (NO_CONTENT).
-
postPendingAcmeChallenges
@PostMapping("/acme-challenges/pending/request-proxy-configs/{requestProxyId}") public org.springframework.http.ResponseEntity<?> postPendingAcmeChallenges(@Valid @RequestBody @Valid String body, @RequestHeader(value="Accept",required=false) String accept, @PathVariable Long requestProxyId){@code POST /acme-challenges/pending/request-proxy-configs/{requestProxyId} : get all pending AcmeChallenges for a given realm.- Parameters:
requestProxyId- of the pending acmeChallenges to retrieve.body- a JWS containing an AcmeChallengeValidation object.- Returns:
- the
ResponseEntitywith status200 (OK)and the list of acmeChallenges in body.
-
processChallengeValidation
@PostMapping("/acme-challenges/validation") public org.springframework.http.ResponseEntity<Void> processChallengeValidation(@Valid @RequestBody @Valid String body, @RequestHeader(value="Accept",required=false) String accept)POST /acme-challenges/validation: process a proxy-validated acmeChallenge.- Parameters:
body- a JWS containing an AcmeChallengeValidation object.- Returns:
- the
ResponseEntitywith status201 (Created)and with body the new acmeChallenge, or with status400 (Bad Request)if the acmeChallenge has already an ID. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
-