Skip to content

Conversation

@ronfroy
Copy link
Contributor

@ronfroy ronfroy commented Jun 20, 2018

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
License MIT

Add a simple from_login_ldap on firewall types to let authenticate with ldap with json API

@chalasr
Copy link
Member

chalasr commented Jun 20, 2018

This needs some tests, at least a unit one for the factory, at best a functional one.

@ronfroy
Copy link
Contributor Author

ronfroy commented Jun 20, 2018

@chalasr others LDAP SecurityListenerFactory are not tested, it's a bit difficult and it's just an improvement of existing behavior. (json + ldap)

@chalasr
Copy link
Member

chalasr commented Jun 20, 2018

others LDAP SecurityListenerFactory are not tested

@ronfroy that's too bad but still, new code should be tested, at least ensuring that the container can compile with your addition in order to prevent regressions. That should not be hard, adding a json_login_ldap listener to https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml (and xml + php) and updating the expected config in the corresponding tests that will fail should be enough.

@ronfroy
Copy link
Contributor Author

ronfroy commented Jun 20, 2018

@chalasr done

@chalasr chalasr added the Ldap label Jun 26, 2018
@nicolas-grekas nicolas-grekas changed the title add json login ldap [SecurityBundle] Add json login ldap Jul 1, 2018
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worth a line in the CHANGELOG file of the bundle - an also a doc PR? LGTM otherwise, thanks.

stateless: true
anonymous: true
json_login_ldap:
check_path: /login
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we align values usually.

@ronfroy
Copy link
Contributor Author

ronfroy commented Jul 1, 2018

anonymous: true
json_login:
check_path: /chk
check_path: /chk
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ronfroy If this has to be changed, it must be done on the lowest branch where it exists to prevent merge conflicts (but I don't think it's worth it, we should just keep it in mind for new code). Can you please revert this change? Same for the custom_handlers.yml file below

@ronfroy
Copy link
Contributor Author

ronfroy commented Jul 6, 2018

@chalasr done

@chalasr
Copy link
Member

chalasr commented Jul 6, 2018

Thank you @ronfroy.

@chalasr chalasr merged commit 2b2dfd2 into symfony:master Jul 6, 2018
chalasr pushed a commit that referenced this pull request Jul 6, 2018
This PR was squashed before being merged into the 4.2-dev branch (closes #27650).

Discussion
----------

[SecurityBundle] Add json login ldap

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Add a simple from_login_ldap on firewall types to let authenticate with ldap with json API

Commits
-------

2b2dfd2 [SecurityBundle] Add json login ldap
@chalasr
Copy link
Member

chalasr commented Jul 6, 2018

@ronfroy Note that github does not recognize your local git user so your contribs aren't linked to your github profile. See https://help.github.com/articles/why-are-my-commits-linked-to-the-wrong-user/ for fixing it

javiereguiluz added a commit to symfony/symfony-docs that referenced this pull request Jul 9, 2018
This PR was merged into the master branch.

Discussion
----------

json-login-ldap

symfony/symfony#27650

Commits
-------

de28118 json-login-ldap
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.2 Nov 1, 2018
This was referenced Nov 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants