Record Class CurrentUserResponse

java.lang.Object
java.lang.Record
com.chaosguide.iam.vertex.client.dto.CurrentUserResponse

public record CurrentUserResponse(String id, String email, String username, String status, boolean emailVerified, CurrentUserResponse.AuthenticationContext authenticationContext, Map<String, com.fasterxml.jackson.databind.JsonNode> metadata) extends Record
Safe GET /api/v1/auth/me view. Metadata is display data, never authorization.
  • Constructor Details

    • CurrentUserResponse

      public CurrentUserResponse(String id, String email, String username, String status, boolean emailVerified, CurrentUserResponse.AuthenticationContext authenticationContext, Map<String, com.fasterxml.jackson.databind.JsonNode> metadata)
      Creates an instance of a CurrentUserResponse record class.
      Parameters:
      id - the value for the id record component
      email - the value for the email record component
      username - the value for the username record component
      status - the value for the status record component
      emailVerified - the value for the emailVerified record component
      authenticationContext - the value for the authenticationContext record component
      metadata - the value for the metadata record component
  • Method Details

    • fromJson

      public static CurrentUserResponse fromJson(com.fasterxml.jackson.databind.JsonNode root)
      Reject incomplete views rather than constructing an anonymous or default context.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • email

      public String email()
      Returns the value of the email record component.
      Returns:
      the value of the email record component
    • username

      public String username()
      Returns the value of the username record component.
      Returns:
      the value of the username record component
    • status

      public String status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • emailVerified

      public boolean emailVerified()
      Returns the value of the emailVerified record component.
      Returns:
      the value of the emailVerified record component
    • authenticationContext

      public CurrentUserResponse.AuthenticationContext authenticationContext()
      Returns the value of the authenticationContext record component.
      Returns:
      the value of the authenticationContext record component
    • metadata

      public Map<String, com.fasterxml.jackson.databind.JsonNode> metadata()
      Returns the value of the metadata record component.
      Returns:
      the value of the metadata record component