@RestController
@RequestMapping(path="${spring.cloud.config.server.prefix:}")
public class EncryptionController
extends Object
| Constructor and Description |
|---|
EncryptionController(TextEncryptorLocator encryptorLocator) |
| Modifier and Type | Method and Description |
|---|---|
String |
decrypt(String data,
org.springframework.http.MediaType type) |
String |
decrypt(String name,
String profiles,
String data,
org.springframework.http.MediaType type) |
org.springframework.http.ResponseEntity<Map<String,Object>> |
decryptionDisabled() |
String |
encrypt(String data,
org.springframework.http.MediaType type) |
String |
encrypt(String name,
String profiles,
String data,
org.springframework.http.MediaType type) |
org.springframework.http.ResponseEntity<Map<String,Object>> |
encryptionTooWeak() |
String |
getPublicKey() |
String |
getPublicKey(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() |
void |
setDefaultApplicationName(String defaultApplicationName) |
void |
setDefaultProfile(String defaultProfile) |
Map<String,Object> |
status() |
public EncryptionController(TextEncryptorLocator encryptorLocator)
public void setDefaultApplicationName(String defaultApplicationName)
public void setDefaultProfile(String defaultProfile)
@GetMapping(value="/key") public String getPublicKey()
@GetMapping(value="/key/{name}/{profiles}")
public String getPublicKey(@PathVariable
String name,
@PathVariable
String profiles)
@PostMapping(value="encrypt") public String encrypt(@RequestBody String data, @RequestHeader(value="Content-Type") org.springframework.http.MediaType type)
@PostMapping(value="/encrypt/{name}/{profiles}")
public String encrypt(@PathVariable
String name,
@PathVariable
String profiles,
@RequestBody
String data,
@RequestHeader(value="Content-Type")
org.springframework.http.MediaType type)
@PostMapping(value="decrypt") public String decrypt(@RequestBody String data, @RequestHeader(value="Content-Type") org.springframework.http.MediaType type)
@PostMapping(value="/decrypt/{name}/{profiles}")
public String decrypt(@PathVariable
String name,
@PathVariable
String profiles,
@RequestBody
String data,
@RequestHeader(value="Content-Type")
org.springframework.http.MediaType type)
@ExceptionHandler(value=org.springframework.cloud.context.encrypt.KeyFormatException.class) public org.springframework.http.ResponseEntity<Map<String,Object>> keyFormat()
@ExceptionHandler(value=org.springframework.cloud.config.server.encryption.KeyNotAvailableException.class) public org.springframework.http.ResponseEntity<Map<String,Object>> keyUnavailable()
@ExceptionHandler(value=org.springframework.cloud.config.server.encryption.DecryptionNotSupportedException.class) public org.springframework.http.ResponseEntity<Map<String,Object>> decryptionDisabled()
@ExceptionHandler(value=org.springframework.cloud.config.server.encryption.KeyNotInstalledException.class) public org.springframework.http.ResponseEntity<Map<String,Object>> notInstalled()
@ExceptionHandler(value=org.springframework.cloud.config.server.encryption.EncryptionTooWeakException.class) public org.springframework.http.ResponseEntity<Map<String,Object>> encryptionTooWeak()
Copyright © 2021 Pivotal Software, Inc.. All rights reserved.