public class DuoConnector extends Object
| Modifier and Type | Field and Description |
|---|---|
protected retrofit2.Retrofit |
retrofit |
| Constructor and Description |
|---|
DuoConnector(String apiHost,
String[] caCerts)
DuoConnector Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
HealthCheckResponse |
duoHealthcheck(String clientId,
String clientAssertion)
Send Health Check request.
|
TokenResponse |
exchangeAuthorizationCodeFor2FAResult(String userAgent,
String grantType,
String duoCode,
String redirectUri,
String clientAssertionType,
String clientAssertion)
Send request to exchange duoCode for an encoded JWT.
|
public DuoConnector(String apiHost, String[] caCerts) throws DuoException
apiHost - This value is the api host provided by Duo in the admin panel.caCerts - CA Certificates used to connect to DuoDuoException - For issues getting and validating the URLpublic HealthCheckResponse duoHealthcheck(String clientId, String clientAssertion) throws DuoException
clientId - The client id provided by Duo in the admin panelclientAssertion - A JWT the Duo Health Check endpoint needsDuoException - For issues sending or receiving the requestpublic TokenResponse exchangeAuthorizationCodeFor2FAResult(String userAgent, String grantType, String duoCode, String redirectUri, String clientAssertionType, String clientAssertion) throws DuoException
userAgent - A user agent stringgrantType - A string that tells what type of exchange that will occurduoCode - An authentication session transaction idredirectUri - The URL to redirect back to after a successful authclientAssertionType - The type of client assertion usedclientAssertion - JWT that holds information to verify that the owner of the duoCode
is authorized to have itDuoException - For issues sending or receiving the request,
or failing to exchange a tokenCopyright © 2021. All rights reserved.