build a custom authentication provider EL

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I'm planing to use the enterprise library in a new web project, and I was
looking at the Security application block which came by defaul with one
provider called database authentication provider. I want to develop new
authentication provider that will work with LADP.
My question where can I find a documentation and code samples on how to
develop a new authentication provider? and how to entegrate this new provider
with the configuaration console? and how to pass parameters from the
web.config to this provider?
Please send me any useful links to help me build this?
Thanks.
 
Hi,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to implement an authentication
provider. If there is any misunderstanding, please feel free to let me know.

As far as I know, you need to implement the IAuthenticationProvider
interface. The interface has an Authenticate method, which checks a
credential and return if it is valid through a boolean value. It also sends
back an identity with output parameter.

You can check the Enterprise Library documentation for more information.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Hi Keven,
My goal is to develop an authentication provider as you said, and I know
that this provider need to implement IAuthentication provider, however I need
more details on how to pass parameters from the Security configuration file
to this provider.
For example I'm planing to build an LDAP Authentication provider and I need
to pass parameters like: LDAP server name, LDAP protocol like "LDAP://" or
"WinNT://" , AuthenticationMode values from 0 to 256 and other parameters.
How to pass these parameters to my Authentication provider through the
Security application block configuration section.

The second question how to add my LdapAuthenticationProvider to the
Authentication provider dropdown in the security app block configuration
section when using the EL configuration console.

Finally I check the EL documentation but there is no example on how to
Extend or Modify the security application block and I would appreciate if
there is a sample code on how to do this kind of task.

Thanks.
 
Unfortunately this link doesn't help because it's talking about Principal
object, however I was looking for a specific examples about the enterprise
library security application block and how to develop a custom authentication
provider.

Thanks.
 
Hi,

The security provider you're implementing is a class that implements
IAuthenticationProvider. You can specify the LDAP server name in the class
constructor or using a property. Then the Authenticate method can utilize
this property.

In the enterprise library, a DbAuthenticationProvider class is implemented.
You can take a look at it and it is a good demonstration.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top