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