hello!
i think i located the problem of my software. but this leads me into - i think -
fundamental questions on handling xwiki from outside.
so far i can initialise a wiki with
this.context = new XWikiContext();
this.context.setDatabase(dbase);
this.xwiki = new XWiki(config, this.context);
from inside the educational platform and am able to create users, groups, documents etc.
even logging in of users works - at last no error occurs.
but i'm not able to open a generated document - which would be the goal.
is the way i'm trying to control xwiki from outside right or is there a better way to
do that? if its right any help on opening documents would be great!
tia,
florian
-------- Original-Nachricht --------
Datum: Wed, 25 Oct 2006 21:58:50 +0200
Von: divil(a)gmx.at
An: xwiki-users(a)objectweb.org
Betreff: Re: [xwiki-users] XWiki Athentication Integration
hello!
thanks, the information was very useful and helped me a lot!
the authentification via the authenticate method is working - i get back a principal with
the name and an exception when i test it with a wrong password.
the problem is that the user still isn't logged in. it seems to me that no cookie is
created where username and password is stored - thats why when i klick on the link to open
the xwikidocument i'm logged in as xwikiguest.
florian
-------- Original-Nachricht --------
Datum: Wed, 25 Oct 2006 10:36:20 +0200
Von: David Delbecq <delbd(a)oma.be>
An: xwiki-users(a)objectweb.org
Betreff: Re: [xwiki-users] XWiki Athentication Integration
Hello,
Just as information,
here we needed to authenticate users on the basis of a system account.
There were specific way to retrieve account informations and specific
way to check password (it's encrypted).
All we did is cut and paste the existing XWikiAuthService
implementation, and rewrite the
public Principal authenticate(String username, String pwd, XWikiContext
context)
It was as easy as pickup encrypted passwrod from system, crypt the
provided user password, compare and return a new SimplePrincipal with
the username.
divil(a)gmx.at a écrit :
hi,
I'm still working on the user login from the educational plattform.
to be precise I'm stuck with reimplementing checkAuth().
when I fill in the username into the context with setUser() and then
call
checkAuth() with the modified context the wiki-page is not accessible.
but when I set the username directly in the checkAuth() - method e.g. return
new XWikiUser("test") - the wiki-page is accessible.
Could you possibly provide me with a sample implementation of this
method?
Florian
Ludovic Dubost wrote:
> Hi,
>
> I would still need more information about how you get the username and
> in which context.
> request.getParameter() is in the context of the request. Does this mean
> that in the environment you are in, everything request contains a
> parameter with the username ?
> If so then you need to modify checkAuth() and fill in the context with
> the username from your request. You don't even need to implement
> authenticate since it will be never called if you reimplement checkAuth
>
> Ludovic
>
> divil(a)gmx.at a écrit :
>
>> hi,
>> The username is being provided by the education - portal we are
>> integrating xwiki into (request.getParam(..). The password is a fixed
>> string. The users are set up with these credentials automatically,
>> when they are being added to an xwiki group. Thats all working - we
>> just haven't been able to figure out ow to log users in then, with
>> these same username/password combinations.
>>
>> florian
>>
>>
>>
>>
>>> Hi,
>>>
>>> I'm not sure I understand how you get the username and password from
>>> your users..
>>>
>>> Ludovic
>>>
>>> divil(a)gmx.at a écrit :
>>>
>>>
>>>> hi,
>>>>
>>>>
>>>> thank you for the answer, but how *could* those two lines look like
if
>>>>
>>>>
>>> we get the username from the request and combine it with a given
>>> password?
>>>
>>>> the authenticate method which takes username, password and context
as
>>>>
>>>>
>>> parameter doesn't seem to do what i expect.
>>>
>>>
>>>> florian
>>>>
>>>>
>>>>
>>>>> Hi,
>>>>>
>>>>> You'll find some info here
>>>>>
>>>>>
>>>>>
>>>
http://www.xwiki.org/xwiki/bin/view/AdminGuide/Authentication+and+Rights+Ma…
>>>
>>>
>>>
>>>>> The authentication service probably needs to be written to handle
>>>>> the specificities of your system.
>>>>> If you already have information in your request or somewhere you
>>>>> might just need to write one or two lines in your authentication
>>>>> service.
>>>>>
>>>>> Ludovic
>>>>>
>>>>> divil(a)gmx.at a écrit :
>>>>>
>>>>>
>>>>>> Hello,
>>>>>> We're currently working on integrating xwiki in an
educational
>>>>>>
>>>>>>
>>>>> plattform. That means, we need to provide an xwiki-page for each
>>>>>
>>>>>
>>> course. We have
>>>
>>>
>>>>> retty much all methods laid out and most of it working, the only
thing
>>>>>
>>>>>
>>> we are
>>>
>>>
>>>>> still not sure about handling is the automatic login, before a user
>>>>>
>>>>>
>>> gets to
>>>
>>>
>>>>> see a specific xwiki-page. Adding users, groups and setting the
>>>>> permissions (in the xwiki) is all dealt with already - the only
thing
>>>>>
>>>>>
>>> that is missing
>>>
>>>
>>>>> is the automatic login.
>>>>>
>>>>>
>>>>>> Is this possible with the existing methods or do we have to
write
>>>>>> our
>>>>>>
>>>>> own authentication-service? If so, is there sample code or anything
>>>>> you
>>>>> could point us to how to proceed?
>>>>>
>>>>>
>>>>>> An option we were contemplating was, posting the login data to
the
>>>>>>
>>>>>>
>>>>> actual xwiki login form in the background (similar to what the
>>>>>
>>>>>
>>> curl-library
>>>
>>>
>>>>> provides in php), but this might just be unnecessary, if there is a
>>>>>
>>>>>
>>> certain
>>>
>>>
>>>>> existing method we can utilize for that.
>>>>>
>>>>>
>>>>>> Thanks a lot for your help in advance!
>>>>>> Florian
>>>>>>
>>>>>>
>>>
------------------------------------------------------------------------
>>>
>>>
>>>>>> --
>>>>>> You receive this message as a subscriber of the
>>>>>>
>>>>>>
>>>>> xwiki-users(a)objectweb.org mailing list.
>>>>>
>>>>>
>>>>>> To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org
>>>>>> For general help: mailto:sympa@objectweb.org?subject=help
>>>>>> ObjectWeb mailing lists service home page:
>>>>>>
>>>>>>
>>>
http://www.objectweb.org/wws
>>>
>>>
>>>>>>
>>>>>>
>>>>> --
>>>>> Ludovic Dubost
>>>>> XPertNet:
http://www.xpertnet.fr/
>>>>> Blog:
http://www.ludovic.org/blog/
>>>>> XWiki:
http://www.xwiki.com
>>>>> Skype: ldubost AIM: nvludo Yahoo: ludovic
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
------------------------------------------------------------------------
>>>>
>>>>
>>>>
>>>> --
>>>> You receive this message as a subscriber of the
>>>>
>>>>
>>> xwiki-users(a)objectweb.org mailing list.
>>>
>>>
>>>> To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org
>>>> For general help: mailto:sympa@objectweb.org?subject=help
>>>> ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws
>>>>
>>>>
>>> --
>>> Ludovic Dubost
>>> XPertNet:
http://www.xpertnet.fr/
>>> Blog:
http://www.ludovic.org/blog/
>>> XWiki:
http://www.xwiki.com
>>> Skype: ldubost AIM: nvludo Yahoo: ludovic
>>>
>>>
>>>
>>>
>>
>>
------------------------------------------------------------------------
>>
>>
>> --
>> You receive this message as a subscriber of the
>> xwiki-users(a)objectweb.org mailing list.
>> To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org
>> For general help: mailto:sympa@objectweb.org?subject=help
>> ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws
>>
>>
>
>
------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the
xwiki-users(a)objectweb.org
mailing list.
To
unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws
------------------------------------------------------------------------
--
You receive this message as a subscriber of the
xwiki-users(a)objectweb.org mailing
list.
To unsubscribe:
mailto:xwiki-users-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN:
--
GMX DSL-Flatrate 0,- Euro* - Überall, wo DSL verfügbar ist!
NEU: Jetzt bis zu 16.000 kBit/s!
--
You receive this message as a subscriber of the xwiki-users(a)objectweb.org mailing list.
To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page: