Closed alex88 closed 11 years ago
You could simply override the template and replace the text input with a selection of buttons like that. Possibly fed to it from configuration.
That can be done too, but in some way an user can still override the endpoint, I've seen a possible solution here https://github.com/formapro/FpOpenIdBundle/pull/16 but i don't understand what he means with the GoogleConsumer extending ConsumerInterface
You have to extend relying_party(consumer in previous versions). It could look like:
<?php
namespace YouProject\OpenId;
use Fp\OpenIdBundle\Bridge\RelyingParty\LightOpenIdRelyingParty;
class GoogleRelyingParty extends LightOpenIdRelyingParty
{
public function supports(Request $request)
{
if (false == parent::supports($request)) {
return false;
}
if (false == $identity = $request->get('openid_identifier', $request->get('openid_identity'))) {
return false;
}
return preg_match('/https?\:\/\/google\.com/', $identity);
}
}
I dont test the code use it as a referance. Next add that class as service to your container. After you can use that service name while configuring openid security listener. There is option relying_party
(look at the doc https://github.com/formapro/FpOpenIdBundle/blob/master/Resources/doc/configuration_reference.md)
Oh great, thanks for the tip @makasim
Hello, it would be nice to create a link or a controller action to login using a set openid provider, to create links like "Login with google" etc..
Is that possible?