com.hazelcast.security

## Class UsernamePasswordCredentials

- java.lang.Object
- - com.hazelcast.security.AbstractCredentials
  - - com.hazelcast.security.UsernamePasswordCredentials

- All Implemented Interfaces:
    Portable, Credentials, Serializable

      public class UsernamePasswordCredentials
      extends AbstractCredentials

  Simple implementation of `Credentials` using username and password as security attributes.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UsernamePasswordCredentials()`
    `UsernamePasswordCredentials(String username, String password)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getClassId()` Returns class identifier for this portable class.
    `int` | `getFactoryId()` Returns PortableFactory ID for this portable class
    `String` | `getPassword()` Gets the password.
    `String` | `getUsername()` Gets the user name.
    `protected void` | `readPortableInternal(PortableReader reader)`
    `void` | `setPassword(String password)` Sets the password.
    `void` | `setUsername(String username)` Sets the user name.
    `String` | `toString()`
    `protected void` | `writePortableInternal(PortableWriter writer)`

    - ### Methods inherited from class com.hazelcast.security.AbstractCredentials

      `equals, getEndpoint, getPrincipal, hashCode, readPortable, setEndpoint, setPrincipal, writePortable`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### UsernamePasswordCredentials

          public UsernamePasswordCredentials()

    - #### UsernamePasswordCredentials

          public UsernamePasswordCredentials(String username,
                                             String password)

  - ### Method Detail

    - #### getUsername

          public String getUsername()

      Gets the user name.
      Returns:
        the user name

    - #### getPassword

          public String getPassword()

      Gets the password.
      Returns:
        the password

    - #### setUsername

          public void setUsername(String username)

      Sets the user name.
      Parameters:
        `username` - the user name to set

    - #### setPassword

          public void setPassword(String password)

      Sets the password.
      Parameters:
        `password` - the password to set

    - #### writePortableInternal

          protected void writePortableInternal(PortableWriter writer)
                                        throws IOException

      Specified by:
        `writePortableInternal` in class `AbstractCredentials`
      Throws:
        `IOException`

    - #### readPortableInternal

          protected void readPortableInternal(PortableReader reader)
                                       throws IOException

      Specified by:
        `readPortableInternal` in class `AbstractCredentials`
      Throws:
        `IOException`

    - #### getFactoryId

          public int getFactoryId()

      Description copied from interface: `Portable`
      Returns PortableFactory ID for this portable class
      Returns:
        factory ID

    - #### getClassId

          public int getClassId()

      Description copied from interface: `Portable`
      Returns class identifier for this portable class. Class ID should be unique per PortableFactory.
      Returns:
        class ID

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2019. All rights reserved.