Interface SimpleUser<IdType>

All Known Implementing Classes:
SimpleUser.Base

public interface SimpleUser<IdType>
A base interface for user object types which allows authentication frameworks such as acteur-auth to share basic user properties, so they can be dropped in. Nothing in Acteur assumes this will be the base user class for anything - it is just a convenience to allow swapping of authentication frameworks that do use it.
Author:
Tim Boudreau
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Simple implementation of SimpleUser
  • Method Summary

    Modifier and Type
    Method
    Description
    Get a human-readable display name, falling back to the name if none is set
    id()
    An ID type, typically a database primary key or something like MongoDB's ObjectID
    Get a string representation of the ID suitable for use in URLs or other places
    Programmatic name of this user suitable for use in urls
    int
    Version of this user, to be incremented when the record of this user is modified
  • Method Details

    • name

      String name()
      Programmatic name of this user suitable for use in urls
      Returns:
      A name
    • version

      int version()
      Version of this user, to be incremented when the record of this user is modified
      Returns:
      a version
    • id

      IdType id()
      An ID type, typically a database primary key or something like MongoDB's ObjectID
      Returns:
      The id that uniquely identifies this user
    • idAsString

      String idAsString()
      Get a string representation of the ID suitable for use in URLs or other places
      Returns:
      The string form of the id
    • displayName

      String displayName()
      Get a human-readable display name, falling back to the name if none is set
      Returns:
      A human readable name