THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
For example, see EncryptingDataProvider:{
Code Block |
---|
...
SecretKey key = EncryptionUtils.getSecretKey(); |
...
// create a new token, encrypt its state and return |
...
ServerAccessToken token = new BearerAccessToken(client, 3600L); |
...
String encryptedToken = ModelEncryptionSupport.encryptAccessToken(token, key); |
...
token.setTokenKey(encryptedToken); |
...
return token; |
...
// decrypt a token given a token key |
...
ModelEncryptionSupport.decryptAccessToken(this, encryptedToken, key); |
...
Using Certificates
Working with the certificates to encrypt the state is similar to working with the symmetric keys. Please check the code examples in EncryptionsUtilsTest.
...