Class EPPAuthToken
java.lang.Object
com.verisign.epp.interfaces.authtoken.v01.EPPAuthToken
EPPAuthToken is the primary client interface class used for authToken
management. An instance of EPPAuthToken is created with an initialized
EPPSession, and can be used for more than one request within a single
thread. A set of setter methods are provided to set the attributes before a
call to one of the send action methods. The responses returned from the send
action methods are either instances of EPPResponse or instances of
response classes in the com.verisign.epp.codec.authtoken.v01 package.-
Constructor Summary
ConstructorsConstructorDescriptionEPPAuthToken(EPPSession session) Constructs anEPPAuthTokengiven an initialized session. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAuthTokenData(EPPAuthTokenData aData) Appends to theListof auth token dataEPPAuthTokenDatainstances to send.voidaddExtension(EPPCodecComponent aExtension) Adds a command extension object.Returns the AuthTokenData list.Returns credential data that was setReturns set of domains for which this auth token is scoped to.Returns get header that was set.Returns the payload that was setGets the response associated with the last command.Get the reason to revoke this tokenReturns set of systems for which this auth token is scoped to.booleanIs there anyAuthTokenDatacontained inEPPAuthTokenCreateCmd?protected voidResets the auth token instance to its initial state.Sends a Auth Token Check Command to the server.
The required attributes have been set with the following methods:
addAuthTokenData(EPPAuthTokenData)- Adds auth token data to check.Sends an Auth Token Create Command to the server.
The required attributes have been set with the following methods:
setCredential- Sets the credential information to authorize creation of the auth token data
The optional attributes have been set with the following:
setTransId- Sets the client transaction identifierSends an Auth Token Delete Command to the server.
The required attributes have been set with the following methods:
addAuthTokenData(EPPAuthTokenData)- Sets the auth token name to delete.sendInfo()Sends an Auth Token Info Command to the server.
The required attributes have been set with the following methods:
addAuthTokenData(EPPAuthTokenData)- Sets the auth token name to get info for.voidsetAuthTokenDataList(List<EPPAuthTokenData> aAuthTokenData) Sets theListof auth token dataEPPAuthTokenDatainstances to sendvoidsetCredential(EPPAuthTokenCredential credential) Set an instance ofEPPAuthTokenCredentialdatavoidsetDomains(List<String> domains) Set domains for which this auth token is scoped to.voidsetHeader(EPPAuthTokenHeader aHeaderStr) Sets the header for this auth token.voidsetPayload(EPPAuthTokenPayload aPayload) Sets the payload for this auth token.voidsetRevokedReason(String revokedReason) Sets the reason to revoke this tokenvoidsetSystems(List<String> systems) Set systems for which this auth token is scoped to.voidsetTransId(String aTransId) Sets the client transaction identifier.
-
Constructor Details
-
EPPAuthToken
Constructs anEPPAuthTokengiven an initialized session.- Parameters:
session- Server session to use.
-
-
Method Details
-
addExtension
Adds a command extension object.- Parameters:
aExtension- command extension object associated with the command
-
setPayload
Sets the payload for this auth token.- Parameters:
aPayload- Payload associated with the auth token message
-
getPayload
Returns the payload that was set- Returns:
- instance of
EPPAuthTokenPayloadobject
-
getHeader
Returns get header that was set.- Returns:
- instance of
EPPAuthTokenHeaderobject.
-
setHeader
Sets the header for this auth token.- Parameters:
aHeaderStr- instance ofEPPAuthTokenHeaderobject
-
hasAuthTokenData
public boolean hasAuthTokenData()Is there anyAuthTokenDatacontained inEPPAuthTokenCreateCmd?- Returns:
trueif list ofEPPAuthTokenDatais notnulland not empty;falseotherwise.
-
getAuthTokenDataList
Returns the AuthTokenData list.- Returns:
Listof auth tokensEPPAuthTokenDatainstances if defined;nullotherwise.
-
setAuthTokenDataList
Sets theListof auth token dataEPPAuthTokenDatainstances to send- Parameters:
aAuthTokenData-ListofEPPAuthTokenDatainstances
-
getCredential
Returns credential data that was set- Returns:
-
setCredential
Set an instance ofEPPAuthTokenCredentialdata- Parameters:
credential-
-
setTransId
Sets the client transaction identifier.- Parameters:
aTransId- Client transaction identifier
-
addAuthTokenData
Appends to theListof auth token dataEPPAuthTokenDatainstances to send.- Parameters:
aData-EPPAuthTokenDatainstance
-
getRevokedReason
Get the reason to revoke this token- Returns:
- Reason
-
setRevokedReason
Sets the reason to revoke this token- Parameters:
revokedReason- reason as a string
-
getDomains
Returns set of domains for which this auth token is scoped to.- Returns:
java.util.Listof domain name strings.
-
setDomains
Set domains for which this auth token is scoped to.- Parameters:
domains-java.util.Listof domain name strings.
-
getSystems
Returns set of systems for which this auth token is scoped to.- Returns:
java.util.Listof system name strings.
-
setSystems
Set systems for which this auth token is scoped to.- Parameters:
systems-java.util.Listof system name strings.
-
sendCheck
Sends a Auth Token Check Command to the server.
The required attributes have been set with the following methods:
addAuthTokenData(EPPAuthTokenData)- Adds auth token data to check. More than one auth tokens can be checked insendCheck
The optional attributes can be set with the following:
setTransId(String)- Sets the client transaction identifier
- Returns:
EPPAuthTokenCheckRespcontaining the auth token check information.- Throws:
EPPCommandException- Error executing the check command. UsegetResponseto get the associated server error response.
-
sendInfo
Sends an Auth Token Info Command to the server.
The required attributes have been set with the following methods:
addAuthTokenData(EPPAuthTokenData)- Sets the auth token name to get info for. Only one auth token is valid.
The optional attributes have been set with the following:
setTransId(String)- Sets the client transaction identifier
- Returns:
EPPAuthTokenInfoRespcontaining the auth token information.- Throws:
EPPCommandException- Error executing the info command. UsegetResponseto get the associated server error response.
-
sendDelete
Sends an Auth Token Delete Command to the server.
The required attributes have been set with the following methods:
addAuthTokenData(EPPAuthTokenData)- Sets the auth token name to delete. Only one auth token is valid.
The optional attributes have been set with the following:
setTransId(String)- Sets the client transaction identifier
- Returns:
EPPResponsecontaining the delete result information.- Throws:
EPPCommandException- Error executing the delete command. UsegetResponseto get the associated server error response.
-
sendCreate
Sends an Auth Token Create Command to the server.
The required attributes have been set with the following methods:
setCredential- Sets the credential information to authorize creation of the auth token data
The optional attributes have been set with the following:
setTransId- Sets the client transaction identifier
- Returns:
EPPAuthTokenCreateRespcontaining the result of inserting the auth token data- Throws:
EPPCommandException- Error executing the create command. UsegetResponseto get the associated server error response.
-
resetAuthToken
protected void resetAuthToken()Resets the auth token instance to its initial state. -
getResponse
Gets the response associated with the last command. This method can be used to retrieve the server error response in the catch block of EPPCommandException.- Returns:
- Response associated with the last command
-