Re: [Catalyst] Problems with authentication (LDAP and Minimal)

2013-06-05 Thread Robert Wohlfarth
On Tue, Jun 4, 2013 at 7:37 AM, user01  wrote:


> which (as i do understand) uses a registered datamodel. OTOH the manpages
> for
> other authentication Methods such as
> "Catalyst::Authentication::Store::LDAP"
> are using a configuration splitting things up into credetial-verification
> and storage-config if i am getting this right. There is nowhere an remark
> about having this datastore somehow registered as model. FE:
>
> __PACKAGE__->config(
>   'authentication' => {
>  default_realm => "ldap",
>  realms => {
>ldap => {
>  credential => {
>class => "Password",
>etc etc ...
>  },
>  store => {
>class => "LDAP",
>binddn => "a=DN, b=to, c=bind, d=with",
>bindpw => "supersecret!",
>etc etc ...
> );
>
> But using this in MyApp just gives me the error "Could not find
> authentication realm 'default'". Of course i tried renaming the realm to
> "default" :)
>


I've used this configuration successfully in a couple of apps.




class NoPassword


class   LDAP
ldap_server ldaps://ldap.domain:636
binddn  uid=user,ou=group,dc=domain
bindpw  password
user_basedn ou=people,dc=domain
user_field  uid
user_filter (uid=%s)
user_scope  one




Hope that helps.

-- 
Robert Wohlfarth
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Problems with authentication (LDAP and Minimal)

2013-06-06 Thread user01

Hi Robert

On Wed, 5 Jun 2013 10:38:46 -0500
Robert Wohlfarth  wrote:

As it seems, my example hand-typed into this mail was OK. 

> On Tue, Jun 4, 2013 at 7:37 AM, user01  wrote:

> > __PACKAGE__->config(
> >   'authentication' => {
> >  default_realm => "ldap",
> >  realms => {
> >ldap => {
> >  credential => {
> >class => "Password",


and i had to read your example

 
> I've used this configuration successfully in a couple of apps.
> 
> 
> 
> 
> class NoPassword
> 
> 


to spot my typo in the real configs i have been using:
__PACKAGE__->config(
'Plugin::Authentication' => {
default_realm => "ldap",
realms => {
 ldap => {
 credentials => {
 class => "Password",
...

"credentials" vs. "credential". Such a silly typo ;)

Thanks a lot for your time
regards
virtual

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/