Package com.unboundid.ldap.sdk
Class OAUTHBEARERBindRequestProperties
- java.lang.Object
-
- com.unboundid.ldap.sdk.OAUTHBEARERBindRequestProperties
-
- All Implemented Interfaces:
java.io.Serializable
@Mutable @ThreadSafety(level=NOT_THREADSAFE) public final class OAUTHBEARERBindRequestProperties extends java.lang.Object implements java.io.Serializable
This class provides a data structure that may be used to hold a number of properties used during processing for a OAUTHBEARER SASL bind operation.- See Also:
OAUTHBEARERBindRequest
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OAUTHBEARERBindRequestProperties(OAUTHBEARERBindRequest bindRequest)
Creates a new set of OAUTHBEARER bind request properties that is a copy of the properties used for the provided bind request.OAUTHBEARERBindRequestProperties(OAUTHBEARERBindRequestProperties properties)
Creates a new set of OAUTHBEARER bind request properties that is a copy of the provided set of properties.OAUTHBEARERBindRequestProperties(java.lang.String accessToken)
Creates a new set of OAUTHBEARER bind request properties with the provided access token.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addKeyValuePair(java.lang.String key, java.lang.String value)
Adds an item to the set of additional key-value pairs that should be included in the bind request.void
clearAdditionalKeyValuePairs()
Clears the set of additional key-value pairs.java.lang.String
getAccessToken()
Retrieves the access token to include in the bind request.java.util.Map<java.lang.String,java.lang.String>
getAdditionalKeyValuePairs()
Retrieves an unmodifiable map of additional key-value pairs that should be included in the bind request.java.lang.String
getAuthorizationID()
Retrieves the authorization ID to include in the GS2 header for the bind request, if any.java.lang.String
getRequestMethod()
Retrieves the method to use for HTTP-based requests, if any.java.lang.String
getRequestPath()
Retrieves the path to use for HTTP-based requests, if any.java.lang.String
getRequestPostData()
Retrieves the data to submit when posting an HTTP-based request, if any.java.lang.String
getRequestQueryString()
Retrieves the query string to use for HTTP-based requests, if any.java.lang.String
getServerAddress()
Retrieves the server address to include in the bind request, if any.java.lang.Integer
getServerPort()
Retrieves the server port to include in the bind request, if any.java.lang.String
removeKeyValuePair(java.lang.String key)
Removes the specified additional key-value pair so it will not be included in the bind request.void
setAccessToken(java.lang.String accessToken)
Specifies the access token to include in the bind request.void
setAuthorizationID(java.lang.String authorizationID)
Specifies the authorization ID to include in the GS2 header for the bind request, if any.void
setRequestMethod(java.lang.String requestMethod)
Specifies the method to use for HTTP-based requests, if it should be included in the bind request.void
setRequestPath(java.lang.String requestPath)
Specifies the path to use for HTTP-based requests, if it should be included in the bind request.void
setRequestPostData(java.lang.String requestPostData)
Specifies the data to submit when posting an HTTP-based request, if it should be included in the bind request.void
setRequestQueryString(java.lang.String requestQueryString)
Specifies the query string to use for HTTP-based requests, if it should be included in the bind request.void
setServerAddress(java.lang.String serverAddress)
Specifies the server address to include in the bind request, if any.void
setServerPort(java.lang.Integer serverPort)
Specifies the server port to include in the bind request, if any.java.lang.String
toString()
Retrieves a string representation of the OAUTHBEARER bind request properties.void
toString(java.lang.StringBuilder buffer)
Appends a string representation of the OAUTHBEARER bind request properties to the provided buffer.
-
-
-
Constructor Detail
-
OAUTHBEARERBindRequestProperties
public OAUTHBEARERBindRequestProperties(@NotNull java.lang.String accessToken)
Creates a new set of OAUTHBEARER bind request properties with the provided access token.- Parameters:
accessToken
- The access token to include in the bind request. It must not benull
or empty.
-
OAUTHBEARERBindRequestProperties
public OAUTHBEARERBindRequestProperties(@NotNull OAUTHBEARERBindRequestProperties properties)
Creates a new set of OAUTHBEARER bind request properties that is a copy of the provided set of properties.- Parameters:
properties
- The set of properties to duplicate. It must not benull
.
-
OAUTHBEARERBindRequestProperties
public OAUTHBEARERBindRequestProperties(@NotNull OAUTHBEARERBindRequest bindRequest)
Creates a new set of OAUTHBEARER bind request properties that is a copy of the properties used for the provided bind request.- Parameters:
bindRequest
- The OAUTHBEARER bind request to use to create this set of properties. It must not benull
.
-
-
Method Detail
-
getAccessToken
@NotNull public java.lang.String getAccessToken()
Retrieves the access token to include in the bind request.- Returns:
- The access token to include in the bind request.
-
setAccessToken
public void setAccessToken(@NotNull java.lang.String accessToken)
Specifies the access token to include in the bind request.- Parameters:
accessToken
- The access token to include in the bind request. It must not benull
or empty.
-
getAuthorizationID
@Nullable public java.lang.String getAuthorizationID()
Retrieves the authorization ID to include in the GS2 header for the bind request, if any.- Returns:
- The authorization ID to include in the GS2 header for the bind
request, or
null
if no authorization ID should be included.
-
setAuthorizationID
public void setAuthorizationID(@Nullable java.lang.String authorizationID)
Specifies the authorization ID to include in the GS2 header for the bind request, if any.- Parameters:
authorizationID
- The authorization ID to include in the bind request. It may benull
if no authorization ID should be provided.
-
getServerAddress
@Nullable public java.lang.String getServerAddress()
Retrieves the server address to include in the bind request, if any.- Returns:
- The server address to include in the bind request, or
null
if it should be omitted.
-
setServerAddress
public void setServerAddress(@Nullable java.lang.String serverAddress)
Specifies the server address to include in the bind request, if any.- Parameters:
serverAddress
- The server address to include in the bind request. It may benull
if the server address should be omitted.
-
getServerPort
@Nullable public java.lang.Integer getServerPort()
Retrieves the server port to include in the bind request, if any.- Returns:
- The server port to include in the bind request, or
null
if it should be omitted.
-
setServerPort
public void setServerPort(@Nullable java.lang.Integer serverPort)
Specifies the server port to include in the bind request, if any.- Parameters:
serverPort
- The server port to include in the bind request. It may benull
if the server port should be omitted. If it is non-null
, then the value must be between 1 and 65535, inclusive.
-
getRequestMethod
@Nullable public java.lang.String getRequestMethod()
Retrieves the method to use for HTTP-based requests, if any.- Returns:
- The method to use for HTTP-based requests, or
null
if it should be omitted from the bind request.
-
setRequestMethod
public void setRequestMethod(@Nullable java.lang.String requestMethod)
Specifies the method to use for HTTP-based requests, if it should be included in the bind request.- Parameters:
requestMethod
- The method to use for HTTP-based requests. It may benull
if the request method should be omitted.
-
getRequestPath
@Nullable public java.lang.String getRequestPath()
Retrieves the path to use for HTTP-based requests, if any.- Returns:
- The path to use for HTTP-based requests, or
null
if it should be omitted from the bind request.
-
setRequestPath
public void setRequestPath(@Nullable java.lang.String requestPath)
Specifies the path to use for HTTP-based requests, if it should be included in the bind request.- Parameters:
requestPath
- The path to use for HTTP-based requests. It may benull
if the request path should be omitted.
-
getRequestPostData
@Nullable public java.lang.String getRequestPostData()
Retrieves the data to submit when posting an HTTP-based request, if any.- Returns:
- The post data for HTTP-based requests, or
null
if it should be omitted from the bind request.
-
setRequestPostData
public void setRequestPostData(@Nullable java.lang.String requestPostData)
Specifies the data to submit when posting an HTTP-based request, if it should be included in the bind request.- Parameters:
requestPostData
- The post data for HTTP-based requests. It may benull
if the post data should be omitted.
-
getRequestQueryString
@Nullable public java.lang.String getRequestQueryString()
Retrieves the query string to use for HTTP-based requests, if any.- Returns:
- The query string to use for HTTP-based requests, or
null
if it should be omitted from the bind request.
-
setRequestQueryString
public void setRequestQueryString(@Nullable java.lang.String requestQueryString)
Specifies the query string to use for HTTP-based requests, if it should be included in the bind request.- Parameters:
requestQueryString
- The query string to use for HTTP-based requests. It may benull
if it should be omitted from the bind request.
-
getAdditionalKeyValuePairs
@NotNull public java.util.Map<java.lang.String,java.lang.String> getAdditionalKeyValuePairs()
Retrieves an unmodifiable map of additional key-value pairs that should be included in the bind request.- Returns:
- An unmodifiable map of additional key-value pairs that should be included in the bind request.
-
addKeyValuePair
public void addKeyValuePair(@NotNull java.lang.String key, @NotNull java.lang.String value)
Adds an item to the set of additional key-value pairs that should be included in the bind request. If an item is already defined with the provided key, then its value will be replaced.- Parameters:
key
- The key to use. It must not benull
or empty, and it must contain only alphabetic characters.value
- The value to use for the key. It must not benull
, and it must not contain the 0x00 or 0x01 characters.
-
removeKeyValuePair
@Nullable public java.lang.String removeKeyValuePair(@NotNull java.lang.String key)
Removes the specified additional key-value pair so it will not be included in the bind request.- Parameters:
key
- The key to remove.- Returns:
- The value that was associated with the key. It may be
null
if the specified key was not set.
-
clearAdditionalKeyValuePairs
public void clearAdditionalKeyValuePairs()
Clears the set of additional key-value pairs.
-
toString
@NotNull public java.lang.String toString()
Retrieves a string representation of the OAUTHBEARER bind request properties.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the OAUTHBEARER bind request properties.
-
-