com.novell.service.security
Class BinderyPasswordIdentity

java.lang.Object
  |
  +--com.novell.java.security.Identity
        |
        +--com.novell.service.security.XplatIdentity
              |
              +--com.novell.service.security.BinderyIdentity
                    |
                    +--com.novell.service.security.BinderyPasswordIdentity

public class BinderyPasswordIdentity
extends BinderyIdentity
implements PasswordIdentity

This class represents a Bindery identity with a password.

See Also:
NdsPasswordIdentity, BinderyIdentityScope, PasswordIdentityFactory

Constructor Summary
BinderyPasswordIdentity(Identity identity)
          Constructs a password identity based on an existing identity.
BinderyPasswordIdentity(java.lang.String name)
          Construct an identity with the specified user name and no scope.
BinderyPasswordIdentity(java.lang.String name, IdentityScope scope)
          Construct an identity with the specified user name as a String and scope as an IdentityScope.
BinderyPasswordIdentity(java.lang.String name, java.lang.String scope)
          Construct an identity with the specified user name and scope as Strings.
 
Method Summary
 Password getNewPassword()
          Return the new password for this identity.
 Password getPassword()
          Return the password for this identity.
 void setNewPassword(Password newPassword)
          Set the new password for this identity.
 void setPassword(Password password)
          Set the password for this identity.
 
Methods inherited from class com.novell.service.security.BinderyIdentity
getAdministrativeDomain, getPasswordIdentityInstance, getUserDomain, getUsername
 
Methods inherited from class com.novell.service.security.XplatIdentity
getSession, getSessionManager, setSession, setSessionManager
 
Methods inherited from class com.novell.java.security.Identity
addCertificate, equals, getCertificates, getInfo, getName, getPublicKey, getScope, hashCode, removeCertificate, setInfo, setPublicKey, toString, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BinderyPasswordIdentity

public BinderyPasswordIdentity(java.lang.String name)
Construct an identity with the specified user name and no scope.
Parameters:
name - The user name of the identity.

BinderyPasswordIdentity

public BinderyPasswordIdentity(java.lang.String name,
                               java.lang.String scope)
                        throws KeyManagementException
Construct an identity with the specified user name and scope as Strings.
Parameters:
name - The user name of the identity.
scope - The scope of the identity (the domain).
Throws:
KeyManagementException - When an error occurs.

BinderyPasswordIdentity

public BinderyPasswordIdentity(java.lang.String name,
                               IdentityScope scope)
                        throws KeyManagementException
Construct an identity with the specified user name as a String and scope as an IdentityScope.
Parameters:
name - The user name of the identity.
scope - The scope of the identity (the domain).
Throws:
KeyManagementException - When an error occurs.

BinderyPasswordIdentity

public BinderyPasswordIdentity(Identity identity)
                        throws KeyManagementException
Constructs a password identity based on an existing identity.

The name and parent scope are copied from the existing identity. If the identity is an XplatIdentity, the session manager is also copied.

Note: If the identity is an Bindery identity, its connection handle is copied, and if the identity is a password identity, its passwords are also copied.

Parameters:
identity - The identity from which to build the copy.
Throws:
KeyManagementException - When an error occurs.
Method Detail

setPassword

public void setPassword(Password password)
Set the password for this identity.

The password case is preserved. Consequently, it is up to the caller to uppercase the password if needed. This set request should not be confused with the createTokens request which alters a user object's password. This request only sets the memory variable for this identity so that when the login request is made, the identity will already have the password and will not need to prompt the user for one.

Specified by:
setPassword in interface PasswordIdentity
Parameters:
password - The password for this identity.
See Also:
getPassword(), setNewPassword(com.novell.service.security.Password)

getPassword

public Password getPassword()
Return the password for this identity.
Specified by:
getPassword in interface PasswordIdentity
Returns:
The current password set in this identity (may be NULL).
See Also:
setPassword(com.novell.service.security.Password), getNewPassword()

setNewPassword

public void setNewPassword(Password newPassword)
Set the new password for this identity.

This is used when a modifyTokens (i.e. change password) request is going to be made. This new password will be used as the object's new password once the modifyTokens request is completed.

Specified by:
setNewPassword in interface PasswordIdentity
Parameters:
newPassword - The new password for this identity.
See Also:
getNewPassword(), setPassword(com.novell.service.security.Password)

getNewPassword

public Password getNewPassword()
Return the new password for this identity.
Specified by:
getNewPassword in interface PasswordIdentity
Returns:
The new password set in this identity (may be NULL).
See Also:
setNewPassword(com.novell.service.security.Password), getPassword()