Package com.verisign.epp.codec.gen
Class EPPLoginCmd
java.lang.Object
com.verisign.epp.codec.gen.EPPCommand
com.verisign.epp.codec.gen.EPPLoginCmd
- All Implemented Interfaces:
EPPCodecComponent,EPPMessage,Serializable,Cloneable
The EPP <login> command is used to establish a session with an EPP
server in response to a greeting issued by the server. A <login>
command MUST be sent to a server before any other EPP command to establish an
ongoing session. A server operator MAY limit the number of failed login
attempts N, 1 <= N <= infinity, after which a login failure results in
the connection to the server (if a connection exists) being closed.
A client identifier and initial password MUST be created on the server before a client can successfully complete a <login> command. The client identifier and initial password MUST be delivered to the client using an out-of-band method that protects the identifier and password from inadvertent disclosure.
In addition to the standard EPP command elements, the <login> command contains the following child elements:
The values of the <version> and <lang> elements MUST exactly match one of the values presented in the EPP greeting.
The PLAIN SASL mechanism presented in [RFC2595] describes a format for providing a user identifier, an authorization identifier, and a password as part of a single plain text string. The EPP authentication mechanism is similar, though EPP does not require a session-level authorization identifier and the user identifier and password are separated into distinct XML elements. Additional identification and authorization schemes MUST be provided at other protocol layers to provide more robust security services.
A client identifier and initial password MUST be created on the server before a client can successfully complete a <login> command. The client identifier and initial password MUST be delivered to the client using an out-of-band method that protects the identifier and password from inadvertent disclosure.
In addition to the standard EPP command elements, the <login> command contains the following child elements:
- A <clID> element that contains the client identifier assigned to the client by the server.
- A <pw> element that contains the client's plain text password. The value of this element is case sensitive.
- An OPTIONAL <newPW> element that contains a new plain text password to be assigned to the client for use with subsequent <login> commands. The value of this element is case sensitive.
- An <options> element that contains the following child elements:
- A <version> element that contains the protocol version to be used for the command or ongoing server session.
- A <lang> element that contains the text response language to be used for the command or ongoing server session commands.
The values of the <version> and <lang> elements MUST exactly match one of the values presented in the EPP greeting.
- A <svcs> element that contains one or more <objURI> elements that contain namespace URIs representing the objects to be managed during the session. The <svcs> element MAY contain an OPTIONAL <svcExtension> element that contains one or more <extURI> elements that identify object extensions to be used during the session.
The PLAIN SASL mechanism presented in [RFC2595] describes a format for providing a user identifier, an authorization identifier, and a password as part of a single plain text string. The EPP authentication mechanism is similar, though EPP does not require a session-level authorization identifier and the user identifier and password are separated into distinct XML elements. Additional identification and authorization schemes MUST be provided at other protocol layers to provide more robust security services.
- See Also:
-
Field Summary
Fields inherited from class com.verisign.epp.codec.gen.EPPCommand
extensions, OP_APPROVE, OP_CANCEL, OP_QUERY, OP_REJECT, OP_REQUEST, transId, TYPE_CHECK, TYPE_CREATE, TYPE_DELETE, TYPE_INFO, TYPE_LOGIN, TYPE_LOGOUT, TYPE_POLL, TYPE_RENEW, TYPE_TRANSFER, TYPE_UPDATE -
Constructor Summary
ConstructorsConstructorDescriptionAllocates a newEPPLoginCmdwith default attribute values.EPPLoginCmd(String aTransId, String aClientId, String aPassword) Allocates a newEPPLoginCmdwith the required attributes.EPPLoginCmd(String aTransId, String aClientId, String aPassword, String aNewPassword) Allocates a newEPPLoginCmdwith the required attributes and the optional new password attribute. -
Method Summary
Modifier and TypeMethodDescriptionclone()CloneEPPLoginCmd.protected voiddoGenDecode(Element aElement) decodeEPPLoginCmdfrom a DOM element tree.protected ElementdoGenEncode(Document aDocument) encodeEPPLoginCmdinto a DOM element tree.booleanimplements a deepEPPLoginCmdcompare.Gets the client login identifier.Gets the list of supported/desired extension services.getLang()Gets the desired EPP language.Gets the EPP command Namespace associated withEPPLoginCmd.Gets the new client password.Gets the client password.Gets the login object services.getType()Gets the EPP command type associated withEPPLoginCmd.Gets the desired EPP version.booleanhasExtensionService(String aNamespaceURI) Does the login extension service include a specified extension service based on the Namespace URI?booleanIs a new password defined?booleanhasService(String aNamespaceURI) Does the login service include a specified service based on the Namespace URI?booleanisValidServices(EPPGreeting aGreeting) Is theEPPLoginCmdservices settings valid as compared with the services specified in theEPPGreeting? The services attributes defined inEPPLoginCmdmust be a subset of the available services specified in theEPPGreeting.voidmergeServicesAndExtensionServices(EPPGreeting aGreeting) Merge the services defined automatically in the EPP SDK configuration with services and extension services defined in the EPP Greeting, so that the login services are sent to only be a subset of the services defined in the EPP Greeting.voidsetClientId(String aClientId) Sets the client login identifier.voidsetExtensionServices(Vector<EPPService> aExtServices) Sets the list of supported/desired extension services.voidSets the desired EPP language.voidsetNewPassword(String aNewPassword) Sets the new client password.voidsetPassword(String aPassword) Sets the client password.voidsetServices(Vector<EPPService> aServices) Sets the login object services.voidsetVersion(String aVersion) Sets the desired EPP version.toString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.Methods inherited from class com.verisign.epp.codec.gen.EPPCommand
addExtension, decode, encode, findDuplicateExtNamespaces, findExtNamespaces, findExtNamespaceSuffixes, findUnsupportedExtNamespaces, findUnsupportedExtNamespaceSuffixes, getExtension, getExtension, getExtensions, getKey, getOp, getTransId, hasExtension, hasExtensions, hasKey, hasTransId, setExtension, setExtensions, setTransId
-
Constructor Details
-
EPPLoginCmd
public EPPLoginCmd()Allocates a newEPPLoginCmdwith default attribute values. the defaults include the following:
- transaction id is set to
null. - client id is set to
null - password is set to
null - new password is set to
null - services is initialized based on the
EPPFactoryconfiguration.
The client id, password, and transaction id must be set before invokingencode. - transaction id is set to
-
EPPLoginCmd
Allocates a newEPPLoginCmdwith the required attributes. The other attributes are initialized as follows:
- new password is set to
null - services is initialized based on the
EPPFactoryconfiguration.
- Parameters:
aTransId- transaction id of the command.aClientId- Client login idaPassword- Client password
- new password is set to
-
EPPLoginCmd
Allocates a newEPPLoginCmdwith the required attributes and the optional new password attribute. The services is initialized based on theEPPFactoryconfiguration.- Parameters:
aTransId- transaction id of the command.aClientId- Client login idaPassword- Client passwordaNewPassword- New client password
-
-
Method Details
-
getNamespace
Gets the EPP command Namespace associated withEPPLoginCmd.- Specified by:
getNamespacein interfaceEPPCodecComponent- Specified by:
getNamespacein interfaceEPPMessage- Specified by:
getNamespacein classEPPCommand- Returns:
- EPPCodec.NS
-
getType
Gets the EPP command type associated withEPPLoginCmd.- Specified by:
getTypein classEPPCommand- Returns:
EPPCommand.TYPE_LOGIN
-
getClientId
Gets the client login identifier.- Returns:
- Client login identifier if defined;
nullotherwise.
-
setClientId
Sets the client login identifier.- Parameters:
aClientId- Client login identifier.
-
getPassword
Gets the client password.- Returns:
- Client password if defined;
nullotherwise.
-
setPassword
Sets the client password.- Parameters:
aPassword- Client password.
-
getNewPassword
Gets the new client password.- Returns:
- New client password if defined;
nullotherwise.
-
setNewPassword
Sets the new client password.- Parameters:
aNewPassword- New client password.
-
hasNewPassword
public boolean hasNewPassword()Is a new password defined?- Returns:
trueif the new password is defined;falseotherwise.
-
getVersion
Gets the desired EPP version. The default version is set toEPPCodec.VERSION.- Returns:
- EPP version identifier if defined;
nullotherwise.
-
setVersion
Sets the desired EPP version. The default version is set toEPPCodec.VERSION.- Parameters:
aVersion- EPP version identifier
-
getLang
Gets the desired EPP language. The EPP language determines the language of the error description strings and should be one of the supported languages of theEPPGreeting. The default language is "en".- Returns:
- The desired EPP language if defined;
nullotherwise.
-
setLang
Sets the desired EPP language. The EPP language determines the language of the error description strings and should be one of the supported languages of theEPPGreeting. The default language is "en".- Parameters:
aLang- The desired EPP language
-
getServices
Gets the login object services.- Returns:
VectorofEPPServiceinstances
-
setServices
Sets the login object services. The default services are retrieved fromEPPFactory.getServices.- Parameters:
aServices-Vectorof desiredEPPServiceinstances
-
hasService
Does the login service include a specified service based on the Namespace URI?- Parameters:
aNamespaceURI- Service Namespace URI to search for- Returns:
trueif the login services include the service Namespace URI;falseotherwise.
-
hasExtensionService
Does the login extension service include a specified extension service based on the Namespace URI?- Parameters:
aNamespaceURI- Extension service Namespace URI to search for- Returns:
trueif the login extension services include the extension service Namespace URI;falseotherwise.
-
getExtensionServices
Gets the list of supported/desired extension services. An EPP Client will retrieve the list of extension services supported by the EPP Server. An EPP Server will retrieve the list of extension services desired by the EPP Client.- Returns:
- Vector of
EPPServiceinstances.
-
setExtensionServices
Sets the list of supported/desired extension services. An EPP Client will set the list of extension services desired. An EPP Server will set the list of supported extension services.- Parameters:
aExtServices- Vector ofEPPServiceinstances.
-
doGenEncode
encodeEPPLoginCmdinto a DOM element tree. The <login> element is created and the attribute nodes are appended as children. This method is part of the Template Design Pattern, whereEPPCommandprovides the publicencodeand calls the abstractdoGenEncode.- Specified by:
doGenEncodein classEPPCommand- Parameters:
aDocument- DOM Document to create elements from- Returns:
- <login> root element tree.
- Throws:
EPPEncodeException- Error encoding the DOM element tree.
-
doGenDecode
decodeEPPLoginCmdfrom a DOM element tree. The "login" element needs to be the value of theaElementargument. This method is part of the Template Design Pattern, whereEPPCommandprovides the publicdecodeand calls the abstractdoGenDecode.- Specified by:
doGenDecodein classEPPCommand- Parameters:
aElement- <login> root element tree.- Throws:
EPPDecodeException- Error decoding the DOM element tree.
-
equals
implements a deepEPPLoginCmdcompare.- Overrides:
equalsin classEPPCommand- Parameters:
aObject-EPPLoginCmdinstance to compare with- Returns:
trueif equal;falseotherwise
-
clone
CloneEPPLoginCmd.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classEPPCommand- Returns:
- clone of
EPPLoginCmd - Throws:
CloneNotSupportedException- standard Object.clone exception
-
toString
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classEPPCommand- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
isValidServices
Is theEPPLoginCmdservices settings valid as compared with the services specified in theEPPGreeting? The services attributes defined inEPPLoginCmdmust be a subset of the available services specified in theEPPGreeting.- Parameters:
aGreeting- Greeting to compare services with- Returns:
trueif the service settings are valid;falseotherwise.
-
mergeServicesAndExtensionServices
Merge the services defined automatically in the EPP SDK configuration with services and extension services defined in the EPP Greeting, so that the login services are sent to only be a subset of the services defined in the EPP Greeting.- Parameters:
aGreeting- EPP Greeting to merge the services in the EPP Login.
-