public class AccountManager extends Object
Modifier and Type | Method and Description |
---|---|
AuthResult |
authenticate(AuthRequest who)
Authenticate the user, potentially creating a new account if they are new.
|
AuthResult |
link(com.google.gerrit.reviewdb.client.Account.Id to,
AuthRequest who)
Link another authentication identity to an existing account.
|
com.google.gerrit.reviewdb.client.Account.Id |
lookup(String externalId) |
AuthResult |
unlink(com.google.gerrit.reviewdb.client.Account.Id from,
AuthRequest who)
Unlink an authentication identity from an existing account.
|
AuthResult |
updateLink(com.google.gerrit.reviewdb.client.Account.Id to,
AuthRequest who)
Update the link to another unique authentication identity to an existing account.
|
public com.google.gerrit.reviewdb.client.Account.Id lookup(String externalId) throws AccountException
AccountException
public AuthResult authenticate(AuthRequest who) throws AccountException, IOException
who
- identity of the user, with any details we received about them.AccountException
- the account does not exist, and cannot be created,
or exists, but cannot be located, or is inactive.IOException
public AuthResult link(com.google.gerrit.reviewdb.client.Account.Id to, AuthRequest who) throws AccountException, com.google.gwtorm.server.OrmException, IOException
to
- account to link the identity onto.who
- the additional identity.AccountException
- the identity belongs to a different account, or it
cannot be linked at this time.com.google.gwtorm.server.OrmException
IOException
public AuthResult updateLink(com.google.gerrit.reviewdb.client.Account.Id to, AuthRequest who) throws com.google.gwtorm.server.OrmException, AccountException, IOException
to
- account to link the identity onto.who
- the additional identity.com.google.gwtorm.server.OrmException
AccountException
- the identity belongs to a different account, or it
cannot be linked at this time.IOException
public AuthResult unlink(com.google.gerrit.reviewdb.client.Account.Id from, AuthRequest who) throws AccountException, com.google.gwtorm.server.OrmException, IOException
from
- account to unlink the identity from.who
- the identity to deleteAccountException
- the identity belongs to a different account, or it
cannot be unlinked at this time.com.google.gwtorm.server.OrmException
IOException