MemoryUser (Apache Tomcat 9.0.62 API Documentation)

Package org.apache.catalina.users

## Class MemoryUser

- java.lang.Object
- - org.apache.catalina.users.AbstractUser
  - - org.apache.catalina.users.GenericUser<MemoryUserDatabase>
    - - org.apache.catalina.users.MemoryUser

- All Implemented Interfaces:
    `Principal`, `User`

      public class MemoryUser
      extends GenericUser<MemoryUserDatabase>

  Concrete implementation of `User` for the `MemoryUserDatabase` implementation of `UserDatabase`.

  Since:
    4.1
  Author:
    Craig R. McClanahan

- - ### Field Summary

    - ### Fields inherited from class org.apache.catalina.users.GenericUser

      `database, groups, roles`

    - ### Fields inherited from class org.apache.catalina.users.AbstractUser

      `fullName, password, username`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `toString()` | Return a String representation of this user.
    `String` | `toXml()` | Return a String representation of this user in XML format.

    - ### Methods inherited from class org.apache.catalina.users.GenericUser

      `addGroup, addRole, equals, getGroups, getRoles, getUserDatabase, hashCode, isInGroup, isInRole, removeGroup, removeGroups, removeRole, removeRoles, setFullName, setPassword, setUsername`

    - ### Methods inherited from class org.apache.catalina.users.AbstractUser

      `getFullName, getName, getPassword, getUsername`

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

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

    - ### Methods inherited from interface java.security.Principal

      `implies`

- - ### Method Detail

    - #### toXml

          public String toXml()

      Return a String representation of this user in XML format.

      IMPLEMENTATION NOTE - For backwards compatibility, the reader that processes this entry will accept either `username` or `name` for the username property.

      Returns:
        the XML representation

    - #### toString

          public String toString()

      Return a String representation of this user.

      Specified by:
        `toString` in interface `Principal`
      Overrides:
        `toString` in class `Object`