Class EncryptionController

java.lang.Object
org.springframework.cloud.config.server.encryption.EncryptionController

@RestController @RequestMapping(path="${spring.cloud.config.server.prefix:}") public class EncryptionController extends Object
Author:
Dave Syer, Tim Ysewyn
  • Constructor Details

  • Method Details

    • setDefaultApplicationName

      public void setDefaultApplicationName(String defaultApplicationName)
    • setDefaultProfile

      public void setDefaultProfile(String defaultProfile)
    • getPublicKey

      @GetMapping("/key") public String getPublicKey()
    • getPublicKey

      @GetMapping("/key/{name}/{profiles}") public String getPublicKey(@PathVariable String name, @PathVariable String profiles)
    • status

      @GetMapping("encrypt/status") public Map<String,Object> status()
    • encrypt

      @PostMapping("encrypt") public String encrypt(@RequestBody String data, @RequestHeader("Content-Type") org.springframework.http.MediaType type)
    • encrypt

      @PostMapping("/encrypt/{name}/{profiles}") public String encrypt(@PathVariable String name, @PathVariable String profiles, @RequestBody String data, @RequestHeader("Content-Type") org.springframework.http.MediaType type)
    • decrypt

      @PostMapping("decrypt") public String decrypt(@RequestBody String data, @RequestHeader("Content-Type") org.springframework.http.MediaType type)
    • decrypt

      @PostMapping("/decrypt/{name}/{profiles}") public String decrypt(@PathVariable String name, @PathVariable String profiles, @RequestBody String data, @RequestHeader("Content-Type") org.springframework.http.MediaType type)
    • keyFormat

      @ExceptionHandler(org.springframework.cloud.context.encrypt.KeyFormatException.class) public org.springframework.http.ResponseEntity<Map<String,Object>> keyFormat()
    • keyUnavailable

      @ExceptionHandler(org.springframework.cloud.config.server.encryption.KeyNotAvailableException.class) public org.springframework.http.ResponseEntity<Map<String,Object>> keyUnavailable()
    • decryptionDisabled

      @ExceptionHandler(org.springframework.cloud.config.server.encryption.DecryptionNotSupportedException.class) public org.springframework.http.ResponseEntity<Map<String,Object>> decryptionDisabled()
    • notInstalled

      @ExceptionHandler(org.springframework.cloud.config.server.encryption.KeyNotInstalledException.class) public org.springframework.http.ResponseEntity<Map<String,Object>> notInstalled()
    • encryptionTooWeak

      @ExceptionHandler(org.springframework.cloud.config.server.encryption.EncryptionTooWeakException.class) public org.springframework.http.ResponseEntity<Map<String,Object>> encryptionTooWeak()
    • invalidCipher

      @ExceptionHandler(org.springframework.cloud.config.server.encryption.InvalidCipherException.class) public org.springframework.http.ResponseEntity<Map<String,Object>> invalidCipher()