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 Summary
Constructors Constructor Description EncryptionController(TextEncryptorLocator encryptorLocator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringdecrypt(String name, String profiles, String data, org.springframework.http.MediaType type)Stringdecrypt(String data, org.springframework.http.MediaType type)org.springframework.http.ResponseEntity<Map<String,Object>>decryptionDisabled()Stringencrypt(String name, String profiles, String data, org.springframework.http.MediaType type)Stringencrypt(String data, org.springframework.http.MediaType type)org.springframework.http.ResponseEntity<Map<String,Object>>encryptionTooWeak()StringgetPublicKey()StringgetPublicKey(String name, String profiles)org.springframework.http.ResponseEntity<Map<String,Object>>invalidCipher()org.springframework.http.ResponseEntity<Map<String,Object>>keyFormat()org.springframework.http.ResponseEntity<Map<String,Object>>keyUnavailable()org.springframework.http.ResponseEntity<Map<String,Object>>notInstalled()voidsetDefaultApplicationName(String defaultApplicationName)voidsetDefaultProfile(String defaultProfile)Map<String,Object>status()
-
-
-
Constructor Detail
-
EncryptionController
public EncryptionController(TextEncryptorLocator encryptorLocator)
-
-
Method Detail
-
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)
-
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()
-
-