com.sun.identity.security
Class DecodeAction
java.lang.Object
com.sun.identity.security.DecodeAction
- All Implemented Interfaces:
- java.security.PrivilegedAction
- public class DecodeAction
- extends java.lang.Object
- implements java.security.PrivilegedAction
The class is used to perform privileged operations with
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 everytime.
Note: Java security permissions check for Access Manager can be enabled by
setting the property com.sun.identity.security.checkcaller
to
true in AMConfig properties file.
Constructor Summary |
DecodeAction(java.lang.String svalue)
Non default constructor to be used when a doPrivileged()
is performed for the decryption operations. |
DecodeAction(java.lang.String value,
com.iplanet.services.util.AMEncryption encrKey)
|
Method Summary |
java.lang.Object |
run()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DecodeAction
public DecodeAction(java.lang.String svalue)
- Non default constructor to be used when a
doPrivileged()
is performed for the decryption operations.
- Parameters:
svalue
- Value of string to be encoded/decoded
DecodeAction
public DecodeAction(java.lang.String value,
com.iplanet.services.util.AMEncryption encrKey)
- Parameters:
value
- Value to be decodedencrKey
- Encryption object to be used for decoding
run
public java.lang.Object run()
- Specified by:
run
in interface java.security.PrivilegedAction
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.