Search in sources :

Example 6 with Http

use of com.duosecurity.client.Http in project cas by apereo.

the class BaseDuoSecurityAuthenticationService method buildHttpPostUserPreAuthRequest.

/**
 * Build http post get user auth request.
 *
 * @param username the username
 * @return the http
 */
protected Http buildHttpPostUserPreAuthRequest(final String username) {
    final Http usersRequest = new Http(HttpMethod.POST.name(), duoProperties.getDuoApiHost(), String.format("/auth/v%s/preauth", AUTH_API_VERSION));
    usersRequest.addParam("username", username);
    return usersRequest;
}
Also used : Http(com.duosecurity.client.Http)

Aggregations

Http (com.duosecurity.client.Http)6 JsonNode (com.fasterxml.jackson.databind.JsonNode)2 Principal (org.apereo.cas.authentication.principal.Principal)2 JSONObject (org.json.JSONObject)2 DuoUserAccount (org.apereo.cas.adaptors.duo.DuoUserAccount)1 DuoUserAccountAuthStatus (org.apereo.cas.adaptors.duo.DuoUserAccountAuthStatus)1