cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
565
Views
0
Helpful
0
Replies

Issue with Duo WebSDK and Duo Prompt

ROHIT_Pawar
Level 1
Level 1

hii are you used WEB-SDK4 for support of MFA and through this you implemented the SSO .
if yes then how the email taking prompt you enable because i checked out their is no prompt available for taking user email-id
and for that i have to use my custom prompt for taking email and then forward

if you be able to clarify and help me kindly thank you!

 public static String duoAuthentication(HttpServletRequest request, HttpServletResponse response) {
        Delegator delegator = (Delegator) request.getAttribute("delegator");
        duoCredentials =  DuoUtilProperty.getInstance(delegator).getDuoCredentials();
        Debug.log(" ==="+duoCredentials);
        stateMap = new HashMap<>();
        try {
            duoClient = new Client.Builder(duoCredentials.get(DuoUtilProperty.COMMON_CLIENT_ID), duoCredentials.get(DuoUtilProperty.COMMON_CLIENT_SECRET), duoCredentials.get(DuoUtilProperty.COMMON_CLIENT_API),duoCredentials.get(DuoUtilProperty.COMMON_CLIENT_REDIRECT_URI)).build();
            duoClient.healthCheck();
            String state = duoClient.generateState();
            stateMap.put(state, username);
            String authUrl = duoClient.createAuthUrl(username, state);
            Debug.log( authUrl +" url | ",Module);
            response.sendRedirect(authUrl);
            return "success";

        } catch (DuoException | IOException e) {
            e.printStackTrace();
            request.setAttribute("_ERROR_MESSAGE_",e.getMessage());
        }
        return "error";
    }```
0 Replies 0
Quick Links