|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unboundid.ldap.sdk.LDAPRequest
com.unboundid.ldap.sdk.BindRequest
com.unboundid.ldap.sdk.SASLBindRequest
com.unboundid.ldap.sdk.unboundidds.UnboundIDTOTPBindRequest
com.unboundid.ldap.sdk.unboundidds.ReusableTOTPBindRequest
@NotMutable @ThreadSafety(level=NOT_THREADSAFE) public final class ReusableTOTPBindRequest
NOTE: This class is part of the Commercial Edition of the UnboundID LDAP SDK for Java. It is not available for use in applications that include only the Standard Edition of the LDAP SDK, and is not supported for use in conjunction with non-UnboundID products.This class provides an implementation of the UNBOUNDID-TOTP SASL bind request that may be used to repeatedly generate one-time password values. Because it is configured with the shared secret rather than a point-in-time version of the password, it can be used for cases in which the authentication process may need to be repeated (e.g., for use in a connection pool, following referrals, or if the auto-reconnect feature is enabled). If the shared secret is not known and the one-time password will be provided from an external source (e.g., entered by a user), then the
SingleUseTOTPBindRequest
variant should be used instead.
Field Summary |
---|
Fields inherited from class com.unboundid.ldap.sdk.unboundidds.UnboundIDTOTPBindRequest |
---|
UNBOUNDID_TOTP_MECHANISM_NAME |
Fields inherited from class com.unboundid.ldap.sdk.SASLBindRequest |
---|
CRED_TYPE_SASL |
Fields inherited from class com.unboundid.ldap.sdk.BindRequest |
---|
VERSION_ELEMENT |
Constructor Summary | |
---|---|
ReusableTOTPBindRequest(java.lang.String authenticationID,
java.lang.String authorizationID,
byte[] sharedSecret,
byte[] staticPassword,
Control... controls)
Creates a new SASL TOTP bind request with the provided information. |
|
ReusableTOTPBindRequest(java.lang.String authenticationID,
java.lang.String authorizationID,
byte[] sharedSecret,
byte[] staticPassword,
int totpIntervalDurationSeconds,
int totpNumDigits,
Control... controls)
Creates a new SASL TOTP bind request with the provided information. |
|
ReusableTOTPBindRequest(java.lang.String authenticationID,
java.lang.String authorizationID,
byte[] sharedSecret,
java.lang.String staticPassword,
Control... controls)
Creates a new SASL TOTP bind request with the provided information. |
|
ReusableTOTPBindRequest(java.lang.String authenticationID,
java.lang.String authorizationID,
byte[] sharedSecret,
java.lang.String staticPassword,
int totpIntervalDurationSeconds,
int totpNumDigits,
Control... controls)
Creates a new SASL TOTP bind request with the provided information. |
Method Summary | |
---|---|
ReusableTOTPBindRequest |
duplicate()
Creates a new instance of this LDAP request that may be modified without impacting this request. |
ReusableTOTPBindRequest |
duplicate(Control[] controls)
Creates a new instance of this LDAP request that may be modified without impacting this request. |
ReusableTOTPBindRequest |
getRebindRequest(java.lang.String host,
int port)
Retrieves a bind request that may be used to re-bind using the same credentials authentication type and credentials as previously used to perform the initial bind. |
protected ASN1OctetString |
getSASLCredentials()
Retrieves the encoded SASL credentials that may be included in an UNBOUNDID-TOTP SASL bind request. |
byte[] |
getSharedSecret()
Retrieves the shared secret key to use when generating the TOTP password. |
int |
getTOTPIntervalDurationSeconds()
Retrieves the duration (in seconds) of the time interval to use when generating the TOTP password. |
int |
getTOTPNumDigits()
Retrieves the number of digits to include in the generated TOTP password. |
Methods inherited from class com.unboundid.ldap.sdk.unboundidds.UnboundIDTOTPBindRequest |
---|
encodeCredentials, getAuthenticationID, getAuthorizationID, getLastMessageID, getSASLMechanismName, getStaticPassword, process, toString |
Methods inherited from class com.unboundid.ldap.sdk.SASLBindRequest |
---|
getBindType, responseReceived, sendBindRequest, sendMessage |
Methods inherited from class com.unboundid.ldap.sdk.BindRequest |
---|
getOperationType |
Methods inherited from class com.unboundid.ldap.sdk.LDAPRequest |
---|
followReferrals, getControl, getControlList, getControls, getIntermediateResponseListener, getResponseTimeoutMillis, hasControl, hasControl, setFollowReferrals, setIntermediateResponseListener, setResponseTimeoutMillis, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ReusableTOTPBindRequest(java.lang.String authenticationID, java.lang.String authorizationID, byte[] sharedSecret, java.lang.String staticPassword, Control... controls)
authenticationID
- The authentication identity for the bind request.
It must not be null
, and must be in the
form "u:" followed by a username, or "dn:"
followed by a DN.authorizationID
- The authorization identity for the bind request.
It may be null
if the authorization
identity should be the same as the authentication
identity. If an authorization identity is
specified, it must be in the form "u:" followed
by a username, or "dn:" followed by a DN. The
value "dn:" may indicate an authorization
identity of the anonymous user.sharedSecret
- The shared secret key to use when generating the
TOTP password.staticPassword
- The static password for the target user. It may
be null
if only the one-time password is
to be used for authentication (which may or may
not be allowed by the server).controls
- The set of controls to include in the bind
request.public ReusableTOTPBindRequest(java.lang.String authenticationID, java.lang.String authorizationID, byte[] sharedSecret, byte[] staticPassword, Control... controls)
authenticationID
- The authentication identity for the bind request.
It must not be null
, and must be in the
form "u:" followed by a username, or "dn:"
followed by a DN.authorizationID
- The authorization identity for the bind request.
It may be null
if the authorization
identity should be the same as the authentication
identity. If an authorization identity is
specified, it must be in the form "u:" followed
by a username, or "dn:" followed by a DN. The
value "dn:" may indicate an authorization
identity of the anonymous user.sharedSecret
- The shared secret key to use when generating the
TOTP password.staticPassword
- The static password for the target user. It may
be null
if only the one-time password is
to be used for authentication (which may or may
not be allowed by the server).controls
- The set of controls to include in the bind
request.public ReusableTOTPBindRequest(java.lang.String authenticationID, java.lang.String authorizationID, byte[] sharedSecret, java.lang.String staticPassword, int totpIntervalDurationSeconds, int totpNumDigits, Control... controls)
authenticationID
- The authentication identity for the
bind request. It must not be
null
, and must be in the form
"u:" followed by a username, or "dn:"
followed by a DN.authorizationID
- The authorization identity for the
bind request. It may be null
if the authorization identity should
be the same as the authentication
identity. If an authorization
identity is specified, it must be in
the form "u:" followed by a username,
or "dn:" followed by a DN. The value
"dn:" may indicate an authorization
identity of the anonymous user.sharedSecret
- The shared secret key to use when
generating the TOTP password.staticPassword
- The static password for the target
user. It may be null
if only
the one-time password is to be used
for authentication (which may or may
not be allowed by the server).totpIntervalDurationSeconds
- The duration (in seconds) of the time
interval to use for TOTP processing.
It must be greater than zero.totpNumDigits
- The number of digits to include in the
generated TOTP password. It must be
greater than or equal to six and less
than or equal to eight.controls
- The set of controls to include in the
bind request.public ReusableTOTPBindRequest(java.lang.String authenticationID, java.lang.String authorizationID, byte[] sharedSecret, byte[] staticPassword, int totpIntervalDurationSeconds, int totpNumDigits, Control... controls)
authenticationID
- The authentication identity for the
bind request. It must not be
null
, and must be in the form
"u:" followed by a username, or "dn:"
followed by a DN.authorizationID
- The authorization identity for the
bind request. It may be null
if the authorization identity should
be the same as the authentication
identity. If an authorization
identity is specified, it must be in
the form "u:" followed by a username,
or "dn:" followed by a DN. The value
"dn:" may indicate an authorization
identity of the anonymous user.sharedSecret
- The shared secret key to use when
generating the TOTP password.staticPassword
- The static password for the target
user. It may be null
if only
the one-time password is to be used
for authentication (which may or may
not be allowed by the server).totpIntervalDurationSeconds
- The duration (in seconds) of the time
interval to use for TOTP processing.
It must be greater than zero.totpNumDigits
- The number of digits to include in the
generated TOTP password. It must be
greater than or equal to six and less
than or equal to eight.controls
- The set of controls to include in the
bind request.Method Detail |
---|
public byte[] getSharedSecret()
public int getTOTPIntervalDurationSeconds()
public int getTOTPNumDigits()
protected ASN1OctetString getSASLCredentials() throws LDAPException
getSASLCredentials
in class UnboundIDTOTPBindRequest
LDAPException
- If a problem is encountered while attempting to
obtain the encoded credentials.public ReusableTOTPBindRequest getRebindRequest(java.lang.String host, int port)
getRebindRequest
in class BindRequest
host
- The address of the directory server to which the connection
is established.port
- The port of the directory server to which the connection is
established.
null
to indicate that automatic
re-binding is not supported for this type of bind request.public ReusableTOTPBindRequest duplicate()
duplicate
in interface ReadOnlyLDAPRequest
duplicate
in class BindRequest
public ReusableTOTPBindRequest duplicate(Control[] controls)
duplicate
in interface ReadOnlyLDAPRequest
duplicate
in class BindRequest
controls
- The set of controls to include in the duplicate request.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |