Hello,
I am trying to do a simple authentication with external service. I used this tutorial: https://www.wowza.com/docs/how-to-integrate-wowza-user-authentication-with-external-authentication-systems-modulertmpauthenticate
But my code not work. no matter whether the login and the password is correct or not, I have always connect.
My Code:
public class RTMPAuth extends AuthenticateUsernamePasswordProviderBase {
@Override
public String getPassword(String username) {
// TODO Auto-generated method stub
//return "bb1a192513ac276d";
return "fdgfdgdf";
//no matter what return, always accepts stream
}
@Override
public boolean userExists(String username) {
// TODO Auto-generated method stub
return false;
}
}
Application.xml
<Modules>
<Module>
<Name>base</Name>
<Description>Base</Description>
<Class>com.wowza.wms.module.ModuleCore</Class>
</Module>
<Module>
<Name>logging</Name>
<Description>Client Logging</Description>
<Class>com.wowza.wms.module.ModuleClientLogging</Class>
</Module>
<Module>
<Name>flvplayback</Name>
<Description>FLVPlayback</Description>
<Class>com.wowza.wms.module.ModuleFLVPlayback</Class>
</Module>
<Module>
<Name>ModuleRTMPAuth</Name>
<Description>vcvccx</Description>
<Class>pl.fotka.wowza.RTMPAuth</Class>
</Module>
<Module>
<Name>ModuleCoreSecurity</Name>
<Description>Core Security Module for Applications</Description>
<Class>com.wowza.wms.security.ModuleCoreSecurity</Class>
</Module>
</Modules>
<Properties>
<Property>
<Name>pushPublishMapPath</Name>
<Value>${com.wowza.wms.context.VHostConfigHome}/conf/${com.wowza.wms.context.Application}/PushPublishMap.txt</Value>
<Type>String</Type>
</Property>
<Property>
<Name>usernamePasswordProviderClass</Name>
<Value>pl.fotka.wowza.RTMPAuth</Value>
<Type>String</Type>
</Property>
</Properties>
Why, when I use this line in getPassword, connect not rejected.
this.client.rejectConnection();