From: Amagoia M. <ama...@ya...> - 2007-01-31 08:47:31
|
At the begining, the datasource that I use for doing the authentification i= s the following:=0A=0A<datasource>=0A <driver-class-name>org.exist.xmldb= .DatabaseImpl</driver-class-name>=0A <uri>xmldb:exist:///</uri>=0A</data= source>=0A=0AI don't specify the username and password, as I'm authentifica= ting the user. Does this mean that I'm connecting like "guest" user when I = do the authentification query?=0A=0AI have tried the authentification query= from the eXist client, and I have no problems. It's just when trying to ac= cess from orbeon's xml pipeline that I get the error.=0A=0AAfterwards, once= the authentification done, I create the datasource dynamically, in order t= o query the database with the user that has been logged (here I have no pro= blems):=0A=0A=0A <p:input name=3D"data" href=3D"#auth"/>=0A <= p:input name=3D"config">=0A <datasource xsl:version=3D"2.0">=0A = <driver-class-name>org.exist.xmldb.DatabaseImpl</driver-clas= s-name>=0A <uri>xmldb:exist:///</uri>=0A <use= rname><xsl:value-of select=3D"//cgcuser/form/username"/></username>=0A = <password><xsl:value-of select=3D"//cgcuser/form/password"/></pa= ssword>=0A </datasource>=0A </p:input> =0A <p:out= put name=3D"data" id=3D"datasource"/> =0A </p:processor>=0A=0AThank you= very much,=0A=0AAmagoia.=0A=0A----- Mensaje original ----=0ADe: Daniel E. = Renfer <Duck@Kronkltd.net>=0APara: Amagoia Madina <ama...@ya...>=0AC= C: exi...@li...=0AEnviado: mi=E9rcoles, 31 de enero, 20= 07 2:16:52=0AAsunto: Re: [Exist-open] eXist and Orbeon Forms. Problem when = changing the password of the guest user=0A=0AWhat does your datasource.xml = file look like? Are you sure you're=0Asending the username and password of = a valid user to perform the=0Aquery? If not, then it's going to try to run = that query as "guest"=0Awith no password. This would give you an error if t= hat's not valid=0Acredentials.=0A=0AI'm assuming you're seeing this error a= s a standard OXFError page.=0A(the error page that Orbeon Forms gives)=0A= =0A-- =0ADaniel E. Renfer=0Ahttp://kronkltd.net/=0A=0AOn 1/30/07, Amagoia M= adina <ama...@ya...> wrote:=0A>=0A> I don't use tomcat authentificat= ion. I have configured tomcat for allowing=0A> all users. However, the firs= t page of my application is a form where the=0A> user has to introduce his = username and password. Thus, I get an instance as=0A> follow:=0A>=0A> <xfor= ms:instance>=0A> <form>=0A> <action/>=0A> <= username/>=0A> <password/>=0A> </form>=0A> </xforms= :instance>=0A>=0A> Afterwards, before entering the application, I verify th= at the user is=0A> registered in my embedded eXist database. My code on the= xml pipeline is:=0A>=0A> <p:param type=3D"input" name=3D"instance"/>=0A>= =0A> <!-- Authenticate user using an eXist extension function -->=0A> = <p:processor name=3D"oxf:xslt">=0A> <p:input name=3D"data" href= =3D"#instance"/>=0A> <p:input name=3D"config">=0A>=0A> = xquery version "1.0";=0A> <authenticated>=0A>=0A> {xmld= b:authenticate(concat('<xsl:value-of=0A> select=3D"doc('../datasource.xml')= /*/uri"/>', '/db/'),=0A> '<xsl:valu= e-of=0A> select=3D"/form/username"/>',=0A> = '<xsl:value-of=0A> select=3D"/form/password"/>')}=0A> = </authenticated>=0A> </xdb:query>=0A> </p:input>=0A>= <p:output name=3D"data" id=3D"xmldb-query"/>=0A> </p:processor= >=0A>=0A> <!-- execute the query -->=0A> <p:processor name=3D"oxf:x= mldb-query">=0A> <p:input name=3D"datasource" href=3D"../datasource= .xml"/>=0A> <p:input name=3D"query" href=3D"#xmldb-query"/>=0A> = <p:output name=3D"data" id=3D"query-resp"/>=0A> </p:processor>=0A>= =0A>=0A>=0A>=0A> <!-- if the user has not been correctly authentifi= cated, we will=0A> redirect him to the login page-->=0A> <p:when te= st=3D"//authenticated=3D'false'">=0A>=0A>=0A>=0A> <p:input = name=3D"data">=0A> <redirect-url>=0A> = <path-info>/</path-info>=0A> </redirect-url>=0A>= </p:input>=0A> </p:processor>=0A> </p:= when>=0A> </p:choose>=0A>=0A> The error that I get is an Orbeon Present= ation Server (ops) error page, but=0A> I think that has something to do wit= h eXist.=0A>=0A>=0A> ----- Mensaje original ----=0A> De: Alessandro Vernet = <av...@sc...>=0A> Para: exi...@li...=0A> Enviado: = martes, 30 de enero, 2007 19:11:23=0A> Asunto: Re: [Exist-open] eXist and O= rbeon Forms. Problem when changing the=0A> password of the guest user=0A>= =0A>=0A>=0A>=0A> Amagoia Madina wrote:=0A> >=0A> > We are developping an ap= plication in Orbeon 3.5 with the embedded eXist=0A> > database. I use the e= Xist authentification function (xmldb:authenticate)=0A> > for accessing the= web application.=0A> >=0A> > I didn't have any problems for acceding my ap= plication when I've changed=0A> > the admin password from the eXist client.= But when I've changed the guest=0A> > user's password, I can no more acces= s my application, even if I try using=0A> > another user.=0A> >=0A> > Examp= le: I try to access my application with admin/xxxx, and I get the=0A> > err= or "invalid password for guest user".=0A> >=0A>=0A> Amagoia,=0A>=0A> I don'= t have an answer for you, but I have some questions: Are you using the=0A> = servlet authentication with the eXist Tomcat realm? What returns this=0A> "= invalid password for guest user" error? Is it Tomcat when you authenticate= =0A> as a user from the browser, or your code when it is calling=0A> xmldb:= authenticate() from XQuery?=0A>=0A> Alex=0A> --=0A> Orbeon Forms - Web Form= s for the Enterprise, Done the Right Way=0A> http://www.orbeon.com/=0A>=0A>= --=0A> View this message in context:=0A> http://www.nabble.com/eXist-and-O= rbeon-Forms.-Problem-when-changing-the-password-of-the-guest-user-tf3143727= .html#a8714092=0A> Sent from the exist-open mailing list archive at Nabble.= com.=0A>=0A>=0A> ----------------------------------------------------------= ---------------=0A> Take Surveys. Earn Cash. Influence the Future of IT=0A>= Join SourceForge.net's Techsay panel and you'll get the chance to share yo= ur=0A> opinions on IT & business topics through brief surveys - and earn ca= sh=0A> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&C= ID=3DDEVDEV=0A> _______________________________________________=0A> Exist-o= pen mailing list=0A> Exi...@li...=0A> https://lists.sou= rceforge.net/lists/listinfo/exist-open=0A>=0A>=0A> _______________________= _________=0A>=0A> LLama Gratis a cualquier PC del Mundo.=0A> Llamadas a fij= os y m=F3viles desde 1 c=E9ntimo por minuto.=0A> http://es.voice.yahoo.com= =0A> ----------------------------------------------------------------------= ---=0A> Take Surveys. Earn Cash. Influence the Future of IT=0A> Join Source= Forge.net's Techsay panel and you'll get the chance to share your=0A> opini= ons on IT & business topics through brief surveys - and earn cash=0A> http:= //www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV= =0A> _______________________________________________=0A> Exist-open mailing= list=0A> Exi...@li...=0A> https://lists.sourceforge.ne= t/lists/listinfo/exist-open=0A>=0A>=0A=0A=0A=0A=0A=0A=0A=0A=09=09=0A_______= _______________________________________ =0ALLama Gratis a cualquier PC del = Mundo. =0ALlamadas a fijos y m=F3viles desde 1 c=E9ntimo por minuto. =0Ahtt= p://es.voice.yahoo.com |