You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Hasini Witharana <ha...@gmail.com> on 2018/07/30 17:43:05 UTC

[Dev][GSoC]Resource /favicon.ico not found

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", "hasinidilanka@gmail.com",
>> "abc".toCharArray());
>>
>>     }
>>
>> }

I created a user with the given credentials(username:hasinidilanka@gmail.com,
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?

Thank You.
-- 
*Hasini Witharana*
Undergraduate | Department of Computer Science and Engineering
University of Moratuwa
Linkedin <https://www.linkedin.com/in/hasini-witharana-185785109/>

Re: [Dev][GSoC]Resource /favicon.ico not found

Posted by Robert Munteanu <ro...@apache.org>.
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", 
>>> "hasinidilanka@gmail.com",
>>> "abc".toCharArray());
>>> 
>>>     }
>>> 
>>> }
> 
> I created a user with the given 
> credentials(username:hasinidilanka@gmail.com,
> 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