public class DecodeAction extends Object implements PrivilegedAction<String>
AccessController.doPrivileged()
when using
com.iplanet.services.util.Crypt to decode passwords. Ths class
implements the interface
PrivilegedAction with a non-default
constructor. This class should be used in order to perform the privileged
operation of com.iplanet.services.util.Crypt.decode/decrypt().
This line of code: String decStr =
com.iplanet.services.util.Crypt.decode(str) should be replaced with: String
decStr = (String) AccessController.doPrivileged( new DecodeAction(str)); If
this is not done and Java security permissions check is enabled, then the
operation will fail and return a null every time.
Note: Java security permissions check for OpenAM can be enabled by
setting the property com.sun.identity.security.checkcaller to
true in AMConfig properties file.
| Modifier and Type | Field and Description |
|---|---|
protected AMEncryption |
encr |
protected String |
value |
| Constructor and Description |
|---|
DecodeAction(String svalue)
Non default constructor to be used when a
doPrivileged()
is performed for the decryption operations. |
DecodeAction(String value,
AMEncryption encrKey) |
protected String value
protected AMEncryption encr
public DecodeAction(String svalue)
doPrivileged()
is performed for the decryption operations.svalue - Value of string to be encoded/decodedpublic DecodeAction(String value, AMEncryption encrKey)
value - Value to be decodedencrKey - Encryption object to be used for decodingpublic String run()
run in interface PrivilegedAction<String>Copyright © 2010–2023 Open Identity Platform Community. All rights reserved.