Package com.google.gerrit.server.auth
Class AuthUser
- java.lang.Object
-
- com.google.gerrit.server.auth.AuthUser
-
public class AuthUser extends Object
An authenticated user as specified by the AuthBackend.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AuthUser.UUID
Globally unique identifier for the user.
-
Constructor Summary
Constructors Constructor Description AuthUser(AuthUser.UUID uuid, String username)
An authenticated user.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getUsername()
Returns the backend specific user name, or null if one does not exist.AuthUser.UUID
getUUID()
Returns the globally unique identifier.int
hashCode()
boolean
hasUsername()
Returnstrue
ifgetUsername()
is not null.String
toString()
-
-
-
Constructor Detail
-
AuthUser
public AuthUser(AuthUser.UUID uuid, String username)
An authenticated user.- Parameters:
uuid
- the globally unique ID.username
- the name of the authenticated user.
-
-
Method Detail
-
getUUID
public final AuthUser.UUID getUUID()
Returns the globally unique identifier.
-
getUsername
public final String getUsername()
Returns the backend specific user name, or null if one does not exist.
-
hasUsername
public final boolean hasUsername()
Returnstrue
ifgetUsername()
is not null.
-
-