Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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, java.io.Serializable, java.lang.Cloneable

    public class EPPLoginCmd

extends EPPCommand

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:

- 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.

Version:
  $Revision: 1.4 $
Author:
  $Author: jim $
See Also:
  `EPPFactory`, Serialized Form

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
`EPPLoginCmd()` Allocates a new `EPPLoginCmd` with default attribute values.
`EPPLoginCmd(java.lang.String aTransId, java.lang.String aClientId, java.lang.String aPassword)` Allocates a new `EPPLoginCmd` with the required attributes.
`EPPLoginCmd(java.lang.String aTransId, java.lang.String aClientId, java.lang.String aPassword, java.lang.String aNewPassword)` Allocates a new `EPPLoginCmd` with the required attributes and the optional new password attribute.

Method Summary
`java.lang.Object` | `clone()` Clone `EPPLoginCmd`.
`protected void` | `doGenDecode(org.w3c.dom.Element aElement)` decode `EPPLoginCmd` from a DOM element tree.
`protected org.w3c.dom.Element` | `doGenEncode(org.w3c.dom.Document aDocument)` encode `EPPLoginCmd` into a DOM element tree.
`boolean` | `equals(java.lang.Object aObject)` implements a deep `EPPLoginCmd` compare.
`java.lang.String` | `getClientId()` Gets the client login identifier.
`java.util.Vector` | `getExtensionServices()` Gets the list of supported/desired extension services.
`java.lang.String` | `getLang()` Gets the desired EPP language.
`java.lang.String` | `getNamespace()` Gets the EPP command Namespace associated with `EPPLoginCmd`.
`java.lang.String` | `getNewPassword()` Gets the new client password.
`java.lang.String` | `getPassword()` Gets the client password.
`java.util.Vector` | `getServices()` Gets the login services.
`java.lang.String` | `getType()` Gets the EPP command type associated with `EPPLoginCmd`.
`java.lang.String` | `getVersion()` Gets the desired EPP version.
`boolean` | `hasNewPassword()` Is a new password defined?
`boolean` | `isValidServices(EPPGreeting aGreeting)` Is the `EPPLoginCmd` services settings valid as compared with the services specified in the `EPPGreeting`?
`void` | `mergeServicesAndExtensionServices(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.
`void` | `setClientId(java.lang.String aClientId)` Sets the client login identifier.
`void` | `setExtensionServices(java.util.Vector someExtServices)` Sets the list of supported/desired extension services.
`void` | `setLang(java.lang.String aLang)` Sets the desired EPP language.
`void` | `setNewPassword(java.lang.String aNewPassword)` Sets the new client password.
`void` | `setPassword(java.lang.String aPassword)` Sets the client password.
`void` | `setServices(java.util.Vector someServices)` Sets the login services.
`void` | `setVersion(java.lang.String aVersion)` Sets the desired EPP version.
`java.lang.String` | `toString()` Implementation of `Object.toString`, which will result in an indented XML `String` representation of the concrete `EPPCodecComponent`.

Methods inherited from class com.verisign.epp.codec.gen.EPPCommand
`addExtension, decode, encode, getExtension, getExtension, getExtensions, getOp, getTransId, hasExtension, hasExtensions, hasTransId, setExtension, setExtensions, setTransId`

Methods inherited from class java.lang.Object
`finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### EPPLoginCmd

    public EPPLoginCmd()

  Allocates a new `EPPLoginCmd` with 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 `EPPFactory` configuration.
  The client id, password, and transaction id must be set before invoking `encode`.

### EPPLoginCmd

    public EPPLoginCmd(java.lang.String aTransId,
                       java.lang.String aClientId,
                       java.lang.String aPassword)

  Allocates a new `EPPLoginCmd` with the required attributes. The other attributes are initialized as follows:
  - new password is set to `null`
  - services is initialized based on the `EPPFactory` configuration.

  Parameters:
    `aTransId` - transaction id of the command.
    `aClientId` - Client login id
    `aPassword` - Client password

### EPPLoginCmd

    public EPPLoginCmd(java.lang.String aTransId,
                       java.lang.String aClientId,
                       java.lang.String aPassword,
                       java.lang.String aNewPassword)

  Allocates a new `EPPLoginCmd` with the required attributes and the optional new password attribute. The services is initialized based on the `EPPFactory` configuration.

  Parameters:
    `aTransId` - transaction id of the command.
    `aClientId` - Client login id
    `aPassword` - Client password
    `aNewPassword` - New client password

Method Detail

### getNamespace

    public java.lang.String getNamespace()

  Gets the EPP command Namespace associated with `EPPLoginCmd`.

  Specified by:
    `getNamespace` in interface `EPPMessage`
  Specified by:
    `getNamespace` in class `EPPCommand`
  Returns:
    EPPCodec.NS

### getType

    public java.lang.String getType()

  Gets the EPP command type associated with `EPPLoginCmd`.

  Specified by:
    `getType` in class `EPPCommand`
  Returns:
    `EPPCommand.TYPE_LOGIN`

### getClientId

    public java.lang.String getClientId()

  Gets the client login identifier.

  Returns:
    Client login identifier if defined; `null` otherwise.

### setClientId

    public void setClientId(java.lang.String aClientId)

  Sets the client login identifier.

  Parameters:
    `aClientId` - Client login identifier.

### getPassword

    public java.lang.String getPassword()

  Gets the client password.

  Returns:
    Client password if defined; `null` otherwise.

### setPassword

    public void setPassword(java.lang.String aPassword)

  Sets the client password.

  Parameters:
    `aPassword` - Client password.

### getNewPassword

    public java.lang.String getNewPassword()

  Gets the new client password.

  Returns:
    New client password if defined; `null` otherwise.

### setNewPassword

    public void setNewPassword(java.lang.String aNewPassword)

  Sets the new client password.

  Parameters:
    `aNewPassword` - New client password.

### hasNewPassword

    public boolean hasNewPassword()

  Is a new password defined?

  Returns:
    `true` if the new password is defined; `false` otherwise.

### getVersion

    public java.lang.String getVersion()

  Gets the desired EPP version. The default version is set to `EPPCodec.VERSION`.

  Returns:
    EPP version identifier if defined; `null` otherwise.

### setVersion

    public void setVersion(java.lang.String aVersion)

  Sets the desired EPP version. The default version is set to `EPPCodec.VERSION`.

  Parameters:
    `aVersion` - EPP version identifier

### getLang

    public java.lang.String 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 the `EPPGreeting`. The default language is "en".

  Returns:
    The desired EPP language if defined; `null` otherwise.

### setLang

    public void setLang(java.lang.String aLang)

  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 the `EPPGreeting`. The default language is "en".

  Parameters:
    `aLang` - The desired EPP language

### getServices

    public java.util.Vector getServices()

  Gets the login services.

  Returns:
    `Vector` of `EPPService` instances

### setServices

    public void setServices(java.util.Vector someServices)

  Sets the login services. The default services are retrieved from `EPPFactory.getServices`.

  Parameters:
    `someServices` - `Vector` of desired `EPPService` instances

### getExtensionServices

    public java.util.Vector 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 `EPPService` instances.

### setExtensionServices

    public void setExtensionServices(java.util.Vector someExtServices)

  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:
    `someExtServices` - Vector of `EPPService` instances.

### doGenEncode

    protected org.w3c.dom.Element doGenEncode(org.w3c.dom.Document aDocument)
                                       throws EPPEncodeException

  encode `EPPLoginCmd` into 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, where `EPPCommand` provides the public `encode` and calls the abstract `doGenEncode`.

  Specified by:
    `doGenEncode` in class `EPPCommand`
  Parameters:
    `aDocument` - DOCUMENT ME!
  Returns:
    <login> root element tree.
  Throws:
    `EPPEncodeException` - Error encoding the DOM element tree.

### doGenDecode

    protected void doGenDecode(org.w3c.dom.Element aElement)
                        throws EPPDecodeException

  decode `EPPLoginCmd` from a DOM element tree. The "login" element needs to be the value of the `aElement` argument. This method is part of the Template Design Pattern, where `EPPCommand` provides the public `decode` and calls the abstract `doGenDecode`.

  Specified by:
    `doGenDecode` in class `EPPCommand`
  Parameters:
    `aElement` - <login> root element tree.
  Throws:
    `EPPDecodeException` - Error decoding the DOM element tree.

### equals

    public boolean equals(java.lang.Object aObject)

  implements a deep `EPPLoginCmd` compare.

  Overrides:
    `equals` in class `EPPCommand`
  Parameters:
    `aObject` - `EPPLoginCmd` instance to compare with
  Returns:
    `true` if equal; `false` otherwise

### clone

    public java.lang.Object clone()
                           throws java.lang.CloneNotSupportedException

  Clone `EPPLoginCmd`.

  Specified by:
    `clone` in interface `EPPCodecComponent`
  Overrides:
    `clone` in class `EPPCommand`
  Returns:
    clone of `EPPLoginCmd`
  Throws:
    `java.lang.CloneNotSupportedException` - standard Object.clone exception

### toString

    public java.lang.String toString()

  Implementation of `Object.toString`, which will result in an indented XML `String` representation of the concrete `EPPCodecComponent`.

  Overrides:
    `toString` in class `EPPCommand`
  Returns:
    Indented XML `String` if successful; `ERROR` otherwise.

### isValidServices

    public boolean isValidServices(EPPGreeting aGreeting)

  Is the `EPPLoginCmd` services settings valid as compared with the services specified in the `EPPGreeting`? The services attributes defined in `EPPLoginCmd` must be a subset of the available services specified in the `EPPGreeting`.

  Parameters:
    `aGreeting` - Greeting to compare services with
  Returns:
    `true` if the service settings are valid; `false` otherwise.

### mergeServicesAndExtensionServices

    public void mergeServicesAndExtensionServices(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.

  Parameters:
    `aGreeting` - EPP Greeting to merge the services in the EPP Login.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © VeriSign Inc. All Rights Reserved.