Class semper.access.PassWordCapability
All Packages Class Hierarchy This Package Previous Next Index
Class semper.access.PassWordCapability
java.lang.Object
|
+----semper.access.Capability
|
+----semper.access.PassWordCapability
- public class PassWordCapability
- extends Capability
SEMPER Class of capability objects. Other managers must create and verify
capabilities before performing potentially dangerous, compromising or
undesirable operations. A password-capability is only valid if a
correct password is/was entered sufficiently recently. The password expires
after a certain time (as specified when creating the capability); after
expiry it must be entered again when the capability is used.
- Version:
- $Revision: 1.6 $ $Date: 1996/08/21 07:40:35 $
- Author:
- Jaap-Henk Hoepman ([email protected])
- See Also:
- Capability
-
PassWordCapability(String, String, int)
- Creates a new PassWordCapability.
-
getPassWord()
- Check whether the capability is still valid and if so, return the true
password.
-
isValid()
- Check whether the capability is still valid.
-
myStreamSize()
- Implementing the Streamable interface
-
readObject(StreamInputInterface)
- Implementing the Streamable interface
-
writeObject(StreamOutputInterface)
- Implementing the Streamable interface
PassWordCapability
public PassWordCapability(String desc,
String passwd,
int timeout)
- Creates a new PassWordCapability. The capability is initially invalid.
- Parameters:
- desc - description of the capability.
- passwd - encrypted passphrase to check against the password
entered by the user.
- timeout - timeout (in milliseconds) for the passphrase in this
capability.
- Returns:
- the new object.
isValid
protected boolean isValid()
- Check whether the capability is still valid. When called for the first time,
the user is asked to enter a password. On subsequent calls the previously
entered password remains valid until it expires after the timeout specified
when creating the capability. If that happens the user must enter the
password again (which in turn is valid for at most timeout milliseconds).
- Returns:
- true if the capability is valid, false if not.
- Overrides:
- isValid in class Capability
- See Also:
- Capability
getPassWord
public String getPassWord()
- Check whether the capability is still valid and if so, return the true
password. If not, the same procedure as for isValid()
will be used. (function included on Torben's request)
- Returns:
- the password if valid, a null string otherwise
- See Also:
- isValid
writeObject
public void writeObject(StreamOutputInterface s) throws StreamIOException
- Implementing the Streamable interface
- Throws: StreamIOException
- as usual
- See Also:
- Streamable;
readObject
public void readObject(StreamInputInterface s) throws StreamIOException
- Implementing the Streamable interface
- Throws: StreamIOException
- as usual
- See Also:
- Streamable;
myStreamSize
public int myStreamSize() throws StreamIOException
- Implementing the Streamable interface
- Throws: StreamIOException
- as usual
- See Also:
- Streamable;
All Packages Class Hierarchy This Package Previous Next Index