Hi, I've been trying to implement some module that makes the following:
1. Stream with FMLE and ask me for username and password, but the username and password are stored in an external database.
My main limitation is that the passwords in the database are kind of encrypted by the MD5 + SHA1 hash methods (just one way), so there's no way I can decode them with functions written in a wowza java module.
The only option I see is to read the password value given from FMLE, and make the process of hashing inside the module (encrypt it), and then compare it with the given field from database (encrypted)....
But I don't know exactly how to override the class and function that compares the password given from FMLE with the "authorized one".
What I did was installing the Media Security AddOn to get the FMLE authentication (it was successfull), then I used the following example where I'm supposed to get the password from database and return it to main function:
It worked as well, but I had to put the encrypted value on the password field
public class AuthenticateUsernamePasswordProviderExample extends AuthenticateUsernamePasswordProviderBase
public String getPassword(String username)
// return password for given username
//here I'm supposed to get the password from database, but I used a known value for testing
catch (Exception e)
public boolean userExists(String username)
// return true if user exists
then I followed this post:
And tried to implement my "code" on this part:
if (username != null && password != null)
String authPassword = filePtr.getPassword(username);
/*the algorithm that encrypts the password given and compares to the authorized pw
(the encrypted one I sent from database in function AuthenticateUsernamePasswordProviderExample)
sha1 and md5 Algorithms are written on bottom
isValid = true;
isAuthenticated = true;
catch (Exception ex)
I modified the Authentication.xml and set the package of my custom class on Basic Authentication, and set publish method to basic on Application.xml but nothing happens. I suppose that's because of MediaSecurity AddOn works with its own digest authentication, or something.
Any suggestions or hints?
I would be very appreciate