@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class GenerateTOTPSharedSecretExtendedRequest extends ExtendedRequest
OneTimePassword class), which can
be used to authenticate to the server via the
UnboundIDTOTPBindRequest.
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds package structure, are only
supported for use against Ping Identity, UnboundID, and
Nokia/Alcatel-Lucent 8661 server products. These classes provide support
for proprietary functionality or for external specifications that are not
considered stable or mature enough to be guaranteed to work in an
interoperable way with other types of LDAP servers.
null authentication identity and a non-null static
password. In this case, the authorization identity for the operation
(typically the user as whom the underlying connection is authenticated,
but possibly a different user if the request also includes a control like
the proxied authorization or intermediate client request control that
specifies and alternate authorization identity, or if the client
authenticated with a SASL mechanism that included an alternate
authorization identity) will be used as the authentication identity for
this request, and the static password must be valid for that user. This
will be treated as a user requesting a TOTP shared secret for their own
account.
null authentication identity (which may or may not
match the authorization identity for the operation) and a
non-null static password that is valid for the provided
authentication identity. This will also be treated as a user requesting
a TOTP shared secret for their own account.
null authentication identity and a null static
password. In this case, the authentication identity must not match the
authorization identity for the operation, and the authorization identity
must have the password-reset privilege. This will be treated as an
administrator requesting a TOTP shared secret on behalf of a user and is
recommended only for the case in which the identity of the user has been
verified through some means other than a static password.
GenerateTOTPSharedSecretExtendedResult.
RevokeTOTPSharedSecretExtendedRequest may be used to remove it from
the user's account.
GenerateTOTPSharedSecretRequest ::= SEQUENCE {
authenticationID [0] OCTET STRING OPTIONAL,
staticPassword [1] OCTET STRING OPTIONAL,
... }
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
GENERATE_TOTP_SHARED_SECRET_REQUEST_OID
The OID (1.3.6.1.4.1.30221.2.6.56) for the generate TOTP shared secret
extended request.
|
TYPE_EXTENDED_REQUEST_OID, TYPE_EXTENDED_REQUEST_VALUE| Constructor and Description |
|---|
GenerateTOTPSharedSecretExtendedRequest(ExtendedRequest request)
Creates a new generate TOTP shared secret extended request that is decoded
from the provided generic extended request.
|
GenerateTOTPSharedSecretExtendedRequest(java.lang.String authenticationID,
ASN1OctetString staticPassword,
Control... controls)
Creates a new generate TOTP shared secret extended request with the
provided information.
|
GenerateTOTPSharedSecretExtendedRequest(java.lang.String authenticationID,
byte[] staticPassword,
Control... controls)
Creates a new generate TOTP shared secret extended request with the
provided information.
|
GenerateTOTPSharedSecretExtendedRequest(java.lang.String authenticationID,
java.lang.String staticPassword,
Control... controls)
Creates a new generate TOTP shared secret extended request with the
provided information.
|
| Modifier and Type | Method and Description |
|---|---|
GenerateTOTPSharedSecretExtendedRequest |
duplicate()
Creates a new instance of this LDAP request that may be modified without
impacting this request.
|
GenerateTOTPSharedSecretExtendedRequest |
duplicate(Control[] controls)
Creates a new instance of this LDAP request that may be modified without
impacting this request.
|
java.lang.String |
getAuthenticationID()
Retrieves the authentication ID that identifies the user for whom to
generate the TOTP shared secret, if provided.
|
java.lang.String |
getExtendedRequestName()
Retrieves the user-friendly name for the extended request, if available.
|
byte[] |
getStaticPasswordBytes()
Retrieves the bytes that comprise the static password for the target user,
if provided.
|
java.lang.String |
getStaticPasswordString()
Retrieves the string representation of the static password for the target
user, if provided.
|
protected GenerateTOTPSharedSecretExtendedResult |
process(LDAPConnection connection,
int depth)
Sends this extended request to the directory server over the provided
connection and returns the associated response.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this request to the provided buffer.
|
encodeProtocolOp, getLastMessageID, getOID, getOperationType, getProtocolOpType, getValue, hasValue, responseReceived, toCode, writeTofollowReferrals, getControl, getControlList, getControls, getIntermediateResponseListener, getReferralConnector, getReferralConnectorInternal, getReferralDepth, getResponseTimeoutMillis, hasControl, hasControl, setFollowReferrals, setIntermediateResponseListener, setReferralConnector, setReferralDepth, setResponseTimeoutMillis, toString@NotNull public static final java.lang.String GENERATE_TOTP_SHARED_SECRET_REQUEST_OID
public GenerateTOTPSharedSecretExtendedRequest(@Nullable java.lang.String authenticationID, @Nullable java.lang.String staticPassword, @Nullable Control... controls)
authenticationID - The authentication ID to use to identify the user
for whom to generate the TOTP shared secret. It
should be a string in the form "dn:" followed by
the DN of the target user, or "u:" followed by
the username. It may be null if the TOTP
shared secret is to be generated for the
authorization identity for the operation, and
only if the staticPassword is
non-null).staticPassword - The static password of the user for whom to
generate the TOTP shared secret. It may be
null only if the authenticationID
is non-null, is different from the
operation's authorization identity, and the
operation's authorization identity has the
password-reset privilege.controls - The set of controls to include in the request.
It may be null or empty if there should
not be any request controls.public GenerateTOTPSharedSecretExtendedRequest(@Nullable java.lang.String authenticationID, @Nullable byte[] staticPassword, @Nullable Control... controls)
authenticationID - The authentication ID to use to identify the user
for whom to generate the TOTP shared secret. It
should be a string in the form "dn:" followed by
the DN of the target user, or "u:" followed by
the username. It may be null if the TOTP
shared secret is to be generated for the
authorization identity for the operation, and
only if the staticPassword is
non-null).staticPassword - The static password of the user for whom to
generate the TOTP shared secret. It may be
null only if the authenticationID
is non-null, is different from the
operation's authorization identity, and the
operation's authorization identity has the
password-reset privilege.controls - The set of controls to include in the request.
It may be null or empty if there should
not be any request controls.public GenerateTOTPSharedSecretExtendedRequest(@Nullable java.lang.String authenticationID, @Nullable ASN1OctetString staticPassword, @Nullable Control... controls)
authenticationID - The authentication ID to use to identify the user
for whom to generate the TOTP shared secret. It
should be a string in the form "dn:" followed by
the DN of the target user, or "u:" followed by
the username. It may be null if the TOTP
shared secret is to be generated for the
authorization identity for the operation, and
only if the staticPassword is
non-null).staticPassword - The static password of the user for whom to
generate the TOTP shared secret. It may be
null only if the authenticationID
is non-null, is different from the
operation's authorization identity, and the
operation's authorization identity has the
password-reset privilege.controls - The set of controls to include in the request.
It may be null or empty if there should
not be any request controls.public GenerateTOTPSharedSecretExtendedRequest(@NotNull ExtendedRequest request) throws LDAPException
request - The generic extended request to decode as a generate TOTP
shared secret request.LDAPException - If a problem is encountered while attempting to
decode the provided request.@Nullable public java.lang.String getAuthenticationID()
null if the shared secret is to be generated for the
authorization identity associated with the extended request.@Nullable public java.lang.String getStaticPasswordString()
null if no static password was provided.@Nullable public byte[] getStaticPasswordBytes()
null if no static password was provided.@NotNull protected GenerateTOTPSharedSecretExtendedResult process(@NotNull LDAPConnection connection, int depth) throws LDAPException
process in class ExtendedRequestconnection - The connection to use to communicate with the directory
server.depth - The current referral depth for this request. It should
always be one for the initial request, and should only
be incremented when following referrals.LDAPException - If a problem occurs while sending the request or
reading the response.@NotNull public GenerateTOTPSharedSecretExtendedRequest duplicate()
duplicate in interface ReadOnlyLDAPRequestduplicate in class ExtendedRequest@NotNull public GenerateTOTPSharedSecretExtendedRequest duplicate(@Nullable Control[] controls)
duplicate in interface ReadOnlyLDAPRequestduplicate in class ExtendedRequestcontrols - The set of controls to include in the duplicate request.@NotNull public java.lang.String getExtendedRequestName()
getExtendedRequestName in class ExtendedRequestpublic void toString(@NotNull java.lang.StringBuilder buffer)
toString in interface ProtocolOptoString in interface ReadOnlyLDAPRequesttoString in class ExtendedRequestbuffer - The buffer to which to append a string representation of
this request.