Package com.mastfrog.acteur.auth
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 ClassesModifier and TypeInterfaceDescriptionstatic classSimple implementation of SimpleUser -
Method Summary
Modifier and TypeMethodDescriptionGet a human-readable display name, falling back to the name if none is setid()An ID type, typically a database primary key or something like MongoDB's ObjectIDGet a string representation of the ID suitable for use in URLs or other placesname()Programmatic name of this user suitable for use in urlsintversion()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
-