Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion User implementation, DB storage but with auth via API
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Marco Aurélio Simão  
View profile   Translate to Translated (View Original)
 More options Aug 24 2012, 8:04 am
From: Marco Aurélio Simão <marco.a.si...@gmail.com>
Date: Fri, 24 Aug 2012 09:04:07 -0300
Local: Fri, Aug 24 2012 8:04 am
Subject: Re: [Symfony2] Re: User implementation, DB storage but with auth via API

Glad this could help, as im find myself many times stuck with one of these
hehehehehehe

atenciosamente,
Marco Aurélio Simão

2012/8/24 Chris Sedlmayr <ch...@sedlmayr.co.uk>

> Hey,

> Yeah, it's all much clearer now, spent some time with Johannes to
> understand some of the internals of the security component.
> It really helps to understand the actual code under the hood, rather than
> just what you should do to make something work.

> We are doing a little more than described here, am trying to find time to
> document it, but this should do for most people for now.

> Thanks,
> Chris

> On 23 August 2012 21:33, marcoiai <marco.a.si...@gmail.com> wrote:

>> Hi. Its seamless. All you need to do is implement UserInterface.

>> There you will return your field that act as username and password, above
>> other fields (check provided links at the bottom).

>> Then, at your security.yml, theres a section like this (only to ilustrate
>> the example):

>> providers:
>>         administrators:
>>             entity: { class: EnovaEntitiesBundle:Entidades, property:
>> usuario }

>> secured_area:
>>             pattern:    ^/
>>             form_login:
>>                 intention:  authenticate
>>                 check_path: /login_check
>>                 login_path: /login
>>                 failure_path: /login
>>                 default_target_path: /agenda
>>                 always_use_default_target_path: true
>>                 username_parameter:   usuario
>>                 password_parameter:   senha

>> Look like i changed password_parameter to "senha", my field that holds
>> the password. The key here is the config of security.yml. You create a void
>> routing rule named /login_check, this is where the magic happens. The
>> security layer intercepts your call to login_check route (this is the url
>> that your login_form will post) and using your entity (in my case
>> EnovaEntitiesBundle:Entidades) will do the password check for you. Dont
>> forget to mantain one firewall to all configuration of security.yml.

>> Read these links:
>> http://symfony.com/doc/current/cookbook/security/entity_provider.html
>> http://symfony.com/doc/current/book/security.html
>> http://symfony.com/doc/current/cookbook/security/form_login.html

>> Em sexta-feira, 24 de fevereiro de 2012 09h21min53s UTC-2, Chris Sedlmayr
>> escreveu:

>>> Still a bit stuck here;

>>> I'm not sure where the actual auth call to the API should be, of course
>>> there is a loadByUsername() function in my UserProvider class, but this is
>>> only to load the user, not authenticate using the password.
>>> The auth must be done at the API level, the API does not return a
>>> password for me to compare, I pass it a password and it does the check then
>>> returns to me the result of the check.

>>> How should I implement this?

>>  --
>> If you want to report a vulnerability issue on symfony, please send it to
>> security at symfony-project.com

>> You received this message because you are subscribed to the Google
>> Groups "Symfony2" group.
>> To post to this group, send email to symfony2@googlegroups.com
>> To unsubscribe from this group, send email to
>> symfony2+unsubscribe@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/symfony2?hl=en

>  --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com

> You received this message because you are subscribed to the Google
> Groups "Symfony2" group.
> To post to this group, send email to symfony2@googlegroups.com
> To unsubscribe from this group, send email to
> symfony2+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony2?hl=en


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.