Hi!
I’m writing a Wowza extension in a form of a custom HTTPProvider and I’m trying to use basic authorization… The problem is that when I test my REST “api” with WRONG credentials a NPE is thrown inside doHTTPAuthentication. When I supply the CORRECT credentials, doHTTPAuthentication returns TRUE, as expected. DIGEST authentication on the other hand works flawlessly.
Why do I need to use basic and not digest authentication is a matter for another discussion.
Stack trace:
==> logs/wowzamediaserver_access.log <==
2013-01-22 12:24:47 CET comment server ERROR 500 - java.lang.NullPointerException
at com.wowza.wms.authentication.AuthenticateBasic.authenticateHTTPProvider(Unknown Source)
at com.wowza.wms.http.HTTProvider2Base.doHTTPAuthentication(Unknown Source)
at org.company.video.wms.module.RestApi.onHTTPRequest(RestApi.java:32) <- my class
at com.wowza.wms.http.HTTPRequestAdapter.service(Unknown Source)
at com.wowza.wms.server.ServerHandler.a(Unknown Source)
at com.wowza.wms.server.ServerHandler.a(Unknown Source)
at com.wowza.wms.server.ServerHandler.messageReceived(Unknown Source)
at com.wowza.wms.server.ServerHandlerThreaded.messageReceived(Unknown Source)
at org.apache.mina.common.support.AbstractIoFilterChain$2.messageReceived(Unknown Source)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Unknown Source)
at org.apache.mina.common.support.AbstractIoFilterChain.access$900(Unknown Source)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(Unknown Source)
at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(Unknown Source)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(Unknown Source)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Unknown Source)
at org.apache.mina.common.support.AbstractIoFilterChain.access$900(Unknown Source)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(Unknown Source)
at org.apache.mina.filter.executor.ExecutorFilter.processEvent(Unknown Source)
at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I’m using HTTProvider2Base.doHTTPAuthentication in this way:
[B]if (!doHTTPAuthentication(vhost, request, response)) {[/B]