public class Login2Delegator extends BaseDelegator implements ILogin2Delegator
MAX_LIMIT_SUPPORTED_MIN_VERSION, QUERY_EXPRESSIONS_SUPPORTED_MIN_VERSION, USER_RESTRICTIONS_SUPPORTED_MIN_VERSION
Constructor and Description |
---|
Login2Delegator(IOptionsServer server)
Instantiates a new login2 delegator.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getLogin2Status()
Return a string indicating the current 2fa login status; corresponds to the
'p4 login2 -s' command.
|
java.lang.String |
getLogin2Status(IUser user)
Return a string indicating the current 2fa login status; corresponds to the
'p4 login2 -s' command.
|
java.lang.String |
login2(IUser user,
Login2Options opts)
Validate user second factor authentication.
|
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
login2(Login2Options opts,
java.lang.String user)
Generic access method for Login2, to bypass the non-interactive clients methods.
|
java.lang.String |
login2CheckAuth(java.lang.String auth,
boolean persist)
For non-interactive clients.
|
java.lang.String |
login2InitAuth(java.lang.String method)
For non-interactive clients.
|
java.util.Map<java.lang.String,java.lang.String> |
login2ListMethods()
For non-interactive clients.
|
public Login2Delegator(IOptionsServer server)
server
- the serverpublic java.util.List<java.util.Map<java.lang.String,java.lang.Object>> login2(Login2Options opts, java.lang.String user) throws P4JavaException
ILogin2Delegator
login2
in interface ILogin2Delegator
opts
- Login2Optionsuser
- non-null Perforce user; login request is for this specified
user, requires 'super' permission.P4JavaException
- if any errors occur during the processing of this command.public java.lang.String getLogin2Status() throws P4JavaException
ILogin2Delegator
getLogin2Status
in interface ILogin2Delegator
P4JavaException
- if any errors occur during the processing of this command.public java.lang.String getLogin2Status(IUser user) throws P4JavaException
ILogin2Delegator
getLogin2Status
in interface ILogin2Delegator
user
- Specifying a username requires 'super' access, which is granted by 'p4 protect'.P4JavaException
- if any errors occur during the processing of this command.public java.util.Map<java.lang.String,java.lang.String> login2ListMethods() throws P4JavaException
ILogin2Delegator
login2ListMethods
in interface ILogin2Delegator
P4JavaException
- if any errors occur during the processing of this command.public java.lang.String login2InitAuth(java.lang.String method) throws P4JavaException
ILogin2Delegator
login2InitAuth
in interface ILogin2Delegator
method
- Second factor authentication method, chosen from the list provided by 'list-methods'.P4JavaException
- if any errors occur during the processing of this command.public java.lang.String login2CheckAuth(java.lang.String auth, boolean persist) throws P4JavaException
ILogin2Delegator
login2CheckAuth
in interface ILogin2Delegator
auth
- The answer to the second factor authorization prompt.persist
- Persist the second factor authorization even after the user's ticket has expired.P4JavaException
- if any errors occur during the processing of this command.public java.lang.String login2(IUser user, Login2Options opts) throws P4JavaException
ILogin2Delegator
login2
in interface ILogin2Delegator
user
- Specifying a username requires 'super' access, which is granted by 'p4 protect'.opts
- Login2OptionsP4JavaException
- if any errors occur during the processing of this command.