1 Reply Latest reply on Jan 19, 2018 9:59 AM by skadri RSS
    skadri Newbie

    Custom authenticator

    Hello Community,


    I have been trying to create a custom authenticator. It's actually based on a parameter that I can get from the httpRequest. What i need to know is how can I, in case this parameter is absent, go back to the default authenticator.


    I already done a test if it's present or not in order to return false and then the next Authenticator in the chain will be given a chance to handle the request and so on until a valid Authentication occurs.


    public boolean matchesAuthRequest(HttpServletRequest req) throws AuthenticatorException {
    // TODO Auto-generated method stub
    if(req.getParameter("parameter1") !=null){ return true;}
    else {return false ;}


    Best regards,

      • Re: Custom authenticator
        ttielebein Collaborator

        Hello, you are doing it exactly right! Just make sure your custom authenticator is configured to have a lower value given for priority than the basic authenticator, so anything below 100 will do. Then, if this matchesAuthRequest returns false, the default authenticators will be hit next. Here is the documentation on this: KCS Article CS244163.


        Hope this helps!