Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Custom configuration for Authenticator
[CDO] Custom configuration for Authenticator [message #1739066] Wed, 27 July 2016 09:58 Go to next message
Stéphane  Thibaudeau is currently offline Stéphane ThibaudeauFriend
Messages: 9
Registered: November 2014
Junior Member
Hi,

I've defined my own authenticator inside the cdo-server.xml file.
My custom authenticator class is instantiated but now I'd like to provide her with configuration parameters (ldap server address and port).

Is there a way to provide my own parameters directly in the cdo-server.xml file ?
Maybe I could set properties on the repository and then access them from my authenticator (or even better from the authenticator factory). But then, how can I access the repository configuration from the authenticator or from the factory ?

If this is not possible, what would be the recommended way to configure my authenticator ?

Regards,
Stéphane
Re: [CDO] Custom configuration for Authenticator [message #1739096 is a reply to message #1739066] Wed, 27 July 2016 13:54 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6579
Registered: July 2009
Senior Member
Hi Stephane,

Your extension of org.eclipse.net4j.util.security.AuthenticatorFactory implements the method
org.eclipse.net4j.util.factory.IFactory.create(String description). The "description" parameter contains the string
attribute from the cdo-server.xml. You can parse it and use it to configure your authenticator.

Cheers
/Eike

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


Am 27.07.2016 um 12:58 schrieb Stéphane Thibaudeau:
> Hi,
>
> I've defined my own authenticator inside the cdo-server.xml file.
> My custom authenticator class is instantiated but now I'd like to provide her with configuration parameters (ldap
> server address and port).
>
> Is there a way to provide my own parameters directly in the cdo-server.xml file ?
> Maybe I could set properties on the repository and then access them from my authenticator (or even better from the
> authenticator factory). But then, how can I access the repository configuration from the authenticator or from the
> factory ?
>
> If this is not possible, what would be the recommended way to configure my authenticator ?
>
> Regards,
> Stéphane


Re: [CDO] Custom configuration for Authenticator [message #1739149 is a reply to message #1739096] Wed, 27 July 2016 19:28 Go to previous messageGo to next message
Stéphane  Thibaudeau is currently offline Stéphane ThibaudeauFriend
Messages: 9
Registered: November 2014
Junior Member
Hi Eike,

Thanks for your reply.
What if I need more parameters ?
I think that description is just a string, you mean I should use my own custom format to pass all the parameters in one string ?

Regards,
Stéphane.
Re: [CDO] Custom configuration for Authenticator [message #1739743 is a reply to message #1739149] Thu, 28 July 2016 04:30 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6579
Registered: July 2009
Senior Member
Am 27.07.2016 um 22:28 schrieb Stéphane Thibaudeau:
> Hi Eike,
>
> Thanks for your reply.
> What if I need more parameters ?
> I think that description is just a string, you mean I should use my own custom format to pass all the parameters in
> one string ?
Yes, that's the way it works.

Cheers
/Eike

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


Re: [CDO] Custom configuration for Authenticator [message #1739744 is a reply to message #1739743] Thu, 28 July 2016 04:34 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6579
Registered: July 2009
Senior Member
Am 28.07.2016 um 07:30 schrieb Eike Stepper:
> Am 27.07.2016 um 22:28 schrieb Stéphane Thibaudeau:
>> Hi Eike,
>>
>> Thanks for your reply.
>> What if I need more parameters ?
>> I think that description is just a string, you mean I should use my own custom format to pass all the parameters in
>> one string ?
> Yes, that's the way it works.
I forgot to mention that you could also register a custom application extension by implementing one of the following
interfaces:

org.eclipse.emf.cdo.spi.server.IAppExtension
org.eclipse.emf.cdo.spi.server.IAppExtension2

Your implementing plugin must contribute to the Eclipse extension registry. An example is in the
org.eclipse.emf.cdo.server.security plugin:

<extension point="org.eclipse.emf.cdo.server.appExtensions">
<appExtension class="org.eclipse.emf.cdo.server.internal.security.SecurityExtension"/>
</extension>

Cheers
/Eike

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


Re: [CDO] Custom configuration for Authenticator [message #1741959 is a reply to message #1739149] Thu, 28 July 2016 04:30 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6579
Registered: July 2009
Senior Member
Am 27.07.2016 um 22:28 schrieb Stéphane Thibaudeau:
> Hi Eike,
>
> Thanks for your reply.
> What if I need more parameters ?
> I think that description is just a string, you mean I should use my own custom format to pass all the parameters in
> one string ?
Yes, that's the way it works.

Cheers
/Eike

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


Re: [CDO] Custom configuration for Authenticator [message #1741960 is a reply to message #1739743] Thu, 28 July 2016 04:34 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6579
Registered: July 2009
Senior Member
Am 28.07.2016 um 07:30 schrieb Eike Stepper:
> Am 27.07.2016 um 22:28 schrieb Stéphane Thibaudeau:
>> Hi Eike,
>>
>> Thanks for your reply.
>> What if I need more parameters ?
>> I think that description is just a string, you mean I should use my own custom format to pass all the parameters in
>> one string ?
> Yes, that's the way it works.
I forgot to mention that you could also register a custom application extension by implementing one of the following
interfaces:

org.eclipse.emf.cdo.spi.server.IAppExtension
org.eclipse.emf.cdo.spi.server.IAppExtension2

Your implementing plugin must contribute to the Eclipse extension registry. An example is in the
org.eclipse.emf.cdo.server.security plugin:

<extension point="org.eclipse.emf.cdo.server.appExtensions">
<appExtension class="org.eclipse.emf.cdo.server.internal.security.SecurityExtension"/>
</extension>

Cheers
/Eike

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


Previous Topic:Xtext based cell editor in EMF
Next Topic:[CDO] CDOBlob datatype
Goto Forum:
  


Current Time: Tue Jun 22 21:31:20 GMT 2021

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

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

Back to the top