[Red5] AdminPanel for War Version
Dan Rossi
spam at electroteque.org
Wed Dec 26 16:48:56 PST 2007
I think this build file should be best outside the main build file
possible ?
Please test this inside dist/webapps/adminPanel/WEB-INF/
It uses user input rather than argument flags which allows to leave
the salt key as default, id prob advise people to change the salt
anyway.
<?xml version="1.0" encoding="UTF-8"?>
<project name="AdminPanel" basedir="." default="pwdgen">
<path id="full.classpath">
<fileset dir="../../../../lib"/>
</path>
<target name="pwdgen">
<echo message="Generating adminPanel password..."/>
<input
message="Enter Password:"
addproperty="password"
/>
<input
message="Enter Salt:"
addproperty="salt"
defaultvalue="seKret"
/>
<java classname="org.red5.adminPanel.utils.PasswordGenerator"
fork="true"
outputproperty="encodedpass">
<classpath>
<pathelement location="./classes/"/>
<path refid="full.classpath"/>
</classpath>
<arg line="${password} ${salt}"/>
</java>
<replaceregexp file="./users.properties" match="\s*=\s*.*\s*,
\s*" replace="=${encodedpass},"/>
<echo message="Generated encoded password: ${encodedpass}"/>
<echo message="Username: admin"/>
</target>
</project>
I was hoping to find an acegi class that actually edits the flatfile
user database but i havent, this would be the better option so it
allows for more than one user :)
Thanks for your help, let me know peeps and ill add to trunk ;)
On 27/12/2007, at 12:41 AM, Manuel R.G. wrote:
> Again the copy/paste problem.
> gmail (hosted) seems to put a SPACE to break my posts:
>
> Please, remove SPACE's yourself from:
>
> <pathelement location="${ webapps.build.dir}/adminPanel/WEB-INF/
> classes"/>
> <java classname=" org.red5.adminPanel.utils.PasswordGenerator"
>
> I think there are no more than these. Sorry again :(
>
>
> 2007/12/26, Manuel R.G. <info at vengava.com>:
> Dan,
>
> it was updating the users.properties encoded password yet.
> Look at your users.properties after calling ant pwdgen.
>
> Now, i've removed properties from my test build.xml to pass them
> command line like:
>
> ant pwdgen -Dpassword=secretpassword -Dsalt=seKret
>
> The build.xml piece now looks like (and "seems" to work):
>
> <!-- adminPanel password encoder -->
>
> <target name="pwdgen" depends="compile">
> <echo message="Generating adminPanel password..."/>
> <java classname=" org.red5.adminPanel.utils.PasswordGenerator"
> fork="true"
> outputproperty="encodedpass">
> <classpath>
> <pathelement location="${ webapps.build.dir}/
> adminPanel/WEB-INF/classes"/>
> <path refid="full.classpath"/>
> </classpath>
> <arg line="${password} ${salt}"/>
> </java>
> <echo message="Generated encoded password: ${encodedpass}"/>
> <replaceregexp file="${webapps.build.dir}/adminPanel/WEB-INF/
> users.properties" match="\s*=\s*.*\s*,\s*" replace="=$
> {encodedpass},"/>
> </target>
>
> <!-- adminPanel password encoder -->
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5_osflash.org/attachments/20071227/0d1d174a/attachment.html
More information about the Red5
mailing list