Record Class PasswordModifyExtendedRequest
java.lang.Object
java.lang.Record
org.forgerock.opendj.ldap.messages.PasswordModifyExtendedRequest
- Record Components:
userIdentity- the identity of the user whose password is to be modified, ornullif the request should be applied to the user currently associated with the session. The returned identity may or may not be a distinguished name.oldPassword- the current password for the user, ornullif the password is not known.newPassword- the desired password for the user, ornullif a new password should be generated.controls- theListcontaining the controls.
- All Implemented Interfaces:
ExtendedRequest<PasswordModifyExtendedResult>,ProtocolOp,Request
public record PasswordModifyExtendedRequest(ByteString userIdentity, ByteString oldPassword, ByteString newPassword, List<Control> controls)
extends Record
implements ExtendedRequest<PasswordModifyExtendedResult>
The password modify extended request as defined in RFC 3062. This operation
allows directory clients to update user passwords. The user may or may not be
associated with a directory entry. The user may or may not be represented as
an LDAP DN. The user's password may or may not be stored in the directory. In
addition, it includes support for requiring the user's current password as
well as for generating a new password if none was provided.
ByteString userIdentity = ...;
ByteString oldPassword = ...;
ByteString newPassword = ...;
Connection connection = ...;
PasswordModifyExtendedRequest request =
Requests.newPasswordModifyExtendedRequest(userIdentity, oldPassword, newPassword);
PasswordModifyExtendedResult result = connection.extendedRequest(request);
if (result.isSuccess()) {
// Changed password
} else {
// Use result to diagnose error.
}
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.forgerock.opendj.ldap.messages.Request
Request.RequestType -
Field Summary
FieldsModifier and TypeFieldDescriptionA decoder which can be used to decode password modify extended operation requests.static final StringThe OID for the password modify extended operation request. -
Constructor Summary
ConstructorsConstructorDescriptionPasswordModifyExtendedRequest(ByteString userIdentity, ByteString oldPassword, ByteString newPassword, List<Control> controls) Create a newPasswordModifyExtendedRequest. -
Method Summary
Modifier and TypeMethodDescriptioncontrols()Returns the value of thecontrolsrecord component.final booleanIndicates whether some other object is "equal to" this one.getOid()Returns the numeric OID associated with this extended request.Returns a decoder which can be used to decoded responses to this extended request.getValue()Returns the value, if any, associated with this extended request.final inthashCode()Returns a hash code value for this object.booleanhasValue()Returnstrueif this extended request has a value.Returns the value of thenewPasswordrecord component.Returns the value of theoldPasswordrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theuserIdentityrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.forgerock.opendj.ldap.messages.ExtendedRequest
accept, getTypeMethods inherited from interface org.forgerock.opendj.ldap.messages.ProtocolOp
addControl, addControls, containsControl, getControl, getControl, removeControls
-
Field Details
-
DECODER
public static final ExtendedRequestDecoder<PasswordModifyExtendedRequest,PasswordModifyExtendedResult> DECODERA decoder which can be used to decode password modify extended operation requests. -
OID
The OID for the password modify extended operation request.- See Also:
-
-
Constructor Details
-
PasswordModifyExtendedRequest
public PasswordModifyExtendedRequest(ByteString userIdentity, ByteString oldPassword, ByteString newPassword, List<Control> controls) Create a newPasswordModifyExtendedRequest.
-
-
Method Details
-
getOid
Description copied from interface:ExtendedRequestReturns the numeric OID associated with this extended request.- Specified by:
getOidin interfaceExtendedRequest<PasswordModifyExtendedResult>- Returns:
- The numeric OID associated with this extended request.
-
getResultDecoder
Description copied from interface:ExtendedRequestReturns a decoder which can be used to decoded responses to this extended request.- Specified by:
getResultDecoderin interfaceExtendedRequest<PasswordModifyExtendedResult>- Returns:
- A decoder which can be used to decoded responses to this extended request.
-
getValue
Description copied from interface:ExtendedRequestReturns the value, if any, associated with this extended request. Its format is defined by the specification of this extended request.- Specified by:
getValuein interfaceExtendedRequest<PasswordModifyExtendedResult>- Returns:
- The value associated with this extended request, or
nullif there is no value.
-
hasValue
public boolean hasValue()Description copied from interface:ExtendedRequestReturnstrueif this extended request has a value. In some circumstances it may be useful to determine if an extended request has a value, without actually calculating the value and incurring any performance costs.- Specified by:
hasValuein interfaceExtendedRequest<PasswordModifyExtendedResult>- Returns:
trueif this extended request has a value, orfalseif there is no value.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
userIdentity
Returns the value of theuserIdentityrecord component.- Returns:
- the value of the
userIdentityrecord component
-
oldPassword
Returns the value of theoldPasswordrecord component.- Returns:
- the value of the
oldPasswordrecord component
-
newPassword
Returns the value of thenewPasswordrecord component.- Returns:
- the value of the
newPasswordrecord component
-
controls
Returns the value of thecontrolsrecord component.- Specified by:
controlsin interfaceProtocolOp- Returns:
- the value of the
controlsrecord component
-