-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated the authentication configuration to support credentials #44
Conversation
cca547c
to
f5815b6
Compare
->end() | ||
->scalarNode('username')->end() | ||
->scalarNode('password')->end() | ||
->scalarNode('token')->end() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could go all fancy with custom validation to have the right required parameters based on the type. but we don't need that now.
i wonder if we should add type service
that accepts a scalarNode authentication_service
to keep supporting custom authentication services?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wonder if we should add type service that accepts a scalarNode authentication_service to keep supporting custom authentication services?
Sure!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure. People can still set up authentication plugins, can't they?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we add type service
then you could use the authentication plugin just as before. It just require you to do a minor config change.
Before:
// config.yml
httplug:
plugins:
authentication:
authentication: 'my_authentication_service'
clients:
my_client:
factory: 'httplug.factory.guzzle6'
plugins: ['httplug.plugin.authentication']
After:
// config.yml
httplug:
plugins:
authentication:
acme:
type: 'service'
service: 'my_authentication_service'
clients:
my_client:
factory: 'httplug.factory.guzzle6'
plugins: ['httplug.plugin.authentication.acme']
perfect, i think this configuration looks as simple and straightforward as it can be! |
ee2eee5
to
fa97a19
Compare
Thank you for the feedback. I've addressed your comments. |
} | ||
break; | ||
case 'bearer': | ||
if (empty($config['bearer'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/bearer/token/
I've merged PR #48 and I think this PR is ready for merge into master. |
A squash would be a good idea first. |
a74aaa4
to
57de525
Compare
Of course, Sorry @sagikazarmark. |
Updated the authentication configuration to support credentials
great job, thanks a lot! |
Thank you for the input! |
This PR fixes #42
This PR will break BC because change of the configuration in
httplug.plugins.authentication
.