Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] : Authentification and userID
[CDO] : Authentification and userID [message #720837] Wed, 31 August 2011 10:18 Go to next message
Nathalie Lepine is currently offline Nathalie LepineFriend
Messages: 28
Registered: July 2009
Junior Member
Hi,

I am connecting to CDO server with user name and password. For that, i
follow the documentation
http://wiki.eclipse.org/Use_CDO_Net4J_Authentification#CDO_4.0 and

- create the PasswordCrendentialsProvider before the connection to the
server is establish which happens in the TCPUtil.getConnector()

- the server configuration defines an acceptor and negotiator
<acceptor type="tcp" listenAddr="0.0.0.0" port="2036">
<negotiator type="challenge" description="_database/repo1.users"/>
</acceptor>

The connection is working (i have no exceptions) but after the
connection, my CDOSession still have a null userId. Do i miss something
? or the userID is set elsewhere ?

Thanks.

Nathalie Lepine.
Re: [CDO] : Authentification and userID [message #720865 is a reply to message #720837] Wed, 31 August 2011 11:59 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 854
Registered: July 2009
Senior Member
You would probably want to use this instead:

<repository name="prod">
<property name="overrideUUID" value="prod" />
<property name="supportingAudits" value="false" />
<property name="supportingBranches" value="false" />
<property name="ensureReferentialIntegrity" value="true" />

<userManager type="file" description="_database/repo1.users" />


You may register your own user manager, too.

[Updated on: Wed, 31 August 2011 12:00]

Report message to a moderator

Re: [CDO] : Authentification and userID [message #720911 is a reply to message #720837] Wed, 31 August 2011 13:27 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Nathalie,

There have been several similar questions i nthis newsgroup. Citing one of my previous answers:

Using the IConnector based authentication is not the recommended way anymore. The new CDOSession based approach envolves
setting an IUserManager into the ISessionManager of the IRepository [This can be done via the XML config file as Erdal
pointed out]. On the client side you need to set an ICredentialsProvider into the CDOAuthenticator of the
CDOSessionConfiguration. Both the IUserManager and the ICredentialsProvider can be the same implementations that you
used with the Net4j based approach before.

I hope that helps

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper




Am 31.08.2011 12:18, schrieb Nathalie Lepine:
> Hi,
>
> I am connecting to CDO server with user name and password. For that, i follow the documentation
> http://wiki.eclipse.org/Use_CDO_Net4J_Authentification#CDO_4.0 and
>
> - create the PasswordCrendentialsProvider before the connection to the server is establish which happens in the
> TCPUtil.getConnector()
>
> - the server configuration defines an acceptor and negotiator
> <acceptor type="tcp" listenAddr="0.0.0.0" port="2036">
> <negotiator type="challenge" description="_database/repo1.users"/>
> </acceptor>
>
> The connection is working (i have no exceptions) but after the connection, my CDOSession still have a null userId. Do
> i miss something ? or the userID is set elsewhere ?
>
> Thanks.
>
> Nathalie Lepine.


Re: [CDO] : Authentification and userID [message #721214 is a reply to message #720911] Thu, 01 September 2011 07:48 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 854
Registered: July 2009
Senior Member
Just found the code I am using to do this on the client side:

...
CDOSessionConfiguration configuration = CDONet4jUtil
				.createSessionConfiguration();
		configuration.setConnector(connector);
		configuration.setRepositoryName(repo);
		final CDOAuthenticator auth = configuration.getAuthenticator();
		IPasswordCredentialsProvider prov = [YOUR_CREDENTIALS_PROVIDER_INSTANCE]
		configuration.getAuthenticator().setCredentialsProvider(prov);
...
Re: [CDO] : Authentification and userID [message #721324 is a reply to message #721214] Thu, 01 September 2011 13:24 Go to previous message
Nathalie Lepine is currently offline Nathalie LepineFriend
Messages: 28
Registered: July 2009
Junior Member
Thanks for yours replies. It works.

Nathalie.
Previous Topic:[EMF] Switch to Indigo, code generation stopped working
Next Topic:[EMF Compare] Confusing toString() message at ModelElementChangeRightTargetImpl
Goto Forum:
  


Current Time: Sat Apr 27 05:06:54 GMT 2024

Powered by FUDForum. Page generated in 0.03169 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top