Class DuoClient
- java.lang.Object
-
- com.logicaldoc.enterprise.security.twofactorsauth.DuoClient
-
public class DuoClient extends Object
A client to communicate with Duo security- Since:
- 8.7.3
- Author:
- Marco Meschieri - LogicalDOC
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
auth(String username, String factor, String passcode, String device)
Executes an authorization callString
authPasscode(String username, String passcode)
Authorizes using a passcode.String
authPhone(String username, String device)
Authorizes using the phone call.String
authPush(String username, String device)
Authorizes using the push mechanism.String
authSMS(String username, String device)
Authorizes using the SMS.boolean
healthCheck()
String
status(String txid)
-
-
-
Method Detail
-
healthCheck
public boolean healthCheck()
-
auth
public String auth(String username, String factor, String passcode, String device)
Executes an authorization call- Parameters:
username
- the user identifier in Duofactor
- one of the available factors: passcode, sms, push, phonepasscode
- the passcodedevice
- optional device specification- Returns:
- allow, deny or the transaction ID in case of async invocation, null in case of error
-
authPasscode
public String authPasscode(String username, String passcode)
Authorizes using a passcode. This method is synchronous.- Parameters:
username
- the user identifier in Duopasscode
- the passcode- Returns:
- allow, deny or null in case of error
-
authPush
public String authPush(String username, String device)
Authorizes using the push mechanism. This method is synchronous.- Parameters:
username
- the user identifier in Duodevice
- the identifier of the device to use or put 'auto'- Returns:
- allow, deny or null in case of error
-
authSMS
public String authSMS(String username, String device)
Authorizes using the SMS. This method is asynchronous.- Parameters:
username
- the user identifier in Duodevice
- the identifier of the device to use or put 'auto'- Returns:
- allow, deny or null in case of error
-
authPhone
public String authPhone(String username, String device)
Authorizes using the phone call. This method is asynchronous.- Parameters:
username
- the user identifier in Duodevice
- the identifier of the device to use or put 'auto'- Returns:
- allow, deny or null in case of error
-
-