SamlBundle icon indicating copy to clipboard operation
SamlBundle copied to clipboard

NO State exception

Open andrius-kulbis opened this issue 12 years ago • 4 comments

Hello

I created a new project with AcmeDemoBundle using Symfony 2.5.4. I have the SimpleSAMLphp configured (working good with plain PHP script).

But when I configure my Symfony2 app as described in your documentation of this bundle, I get redirected to IdP, authenticate successfully and then when I am send back to SimpleSAMLphp of my SP I get "NO State found" exception. What is the problem?

P.S. All the configuration is as it is in your documentation.

andrius-kulbis avatar Oct 07 '14 17:10 andrius-kulbis

Hello,

I make the connection to saml this way:

       $auth = new \SimpleSAML_Auth_Simple($this->serviceprovider);
        $auth->requireAuth(); 

        if ($auth->isAuthenticated()) {
           .......

How do you connect to your Saml with plain PHP script?

This can also be a session problem ... see https://code.google.com/p/simplesamlphp/wiki/LostState

pdias avatar Oct 07 '14 17:10 pdias

Fixed the problem. I needed to add the following line in session configuration:

#app/config/config.yml

session:
        storage_id: session.storage.php_bridge #this line
        handler_id:  ~

The second problem:

 "Your provider must resturn attribute "mail"". 

Is this configurable? Because I am going to use the uid or eduPersonPrincipalName for authentication in my SP side (I check if user is exists in my own DB to).

andrius-kulbis avatar Oct 08 '14 06:10 andrius-kulbis

Glad you were able to solve the problem.

In relation to use "mail", I can make this configurable. Today i got it. You can check the user in BD, using a loginlistener.

pdias avatar Oct 08 '14 09:10 pdias

I upgraded to allow choosing a field. At this point i still untested.

pdias avatar Oct 08 '14 22:10 pdias