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 Stringauth(String username, String factor, String passcode, String device)Executes an authorization callStringauthPasscode(String username, String passcode)Authorizes using a passcode.StringauthPhone(String username, String device)Authorizes using the phone call.StringauthPush(String username, String device)Authorizes using the push mechanism.StringauthSMS(String username, String device)Authorizes using the SMS.booleanhealthCheck()Stringstatus(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
-
-