Hi Hasini,

On 2018-07-30 19:43, Hasini Witharana wrote:
Hi all,

I am creating a custom authentication handler by implementing
AuthenticationHandler interface. I have registered the custom
authentication handler as a OSGI component and the below code shows the
custom authentication handler I implemented.

@Component(
        service = AuthenticationHandler.class ,
        name = "OIDC Authentication Handler",
        property = {"sling.servlet.methods={GET, POST}",
AuthenticationHandler.PATH_PROPERTY+"=/auth/oidc", },
        immediate = true)

public class OIDCAuthenticationHandler extends
DefaultAuthenticationFeedbackHandler implements AuthenticationHandler {


    @Override
    public AuthenticationInfo extractCredentials(HttpServletRequest
request, HttpServletResponse response) {


return new AuthenticationInfo("OIDC", "[email protected]",
"abc".toCharArray());

    }

}

I created a user with the given credentials(username:[email protected],
password:abc) manually and I am trying to get logged into
http://localhost:8080/starter/index.html automatically with the above
credentials.

When I send a request to http://localhost:8080/auth/oidc as shown in the
code I am getting the below error in error logs.

*Resource /favicon.ico not found*

How to solve this?

That is a request that the browser automatically sends and should not impact your Sling app at all.

Robert

Reply via email to