hwioauthbundle

Serialization of UploadedFile is not allowed

我的未来我决定 提交于 2021-02-04 16:42:05
问题 I'm trying to upload a file via vichuploader bundle on my Users entity. Using hwioauthbundle that implements UserInterface, and i think the errors comes from that bundle... So every time i try to uplod a file i got this exception : Serialization of 'Symfony\Component\HttpFoundation\File\UploadedFile' is not allowed I already tried this solution but also same exception. namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; use HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface;

How can I write a user provider for HWIOAuthBundle

蓝咒 提交于 2020-02-24 11:07:53
问题 I want to write a login feature via social networks. if the user is not logged it persists it into the database, if the user exists, log the user in. What should I write into my provider? Docs state : The bundle needs a service that is able to load users based on the user response of the oauth endpoint. If you have a custom service it should implement the interface: HWI\Bundle\OAuthBundle\Security\Core\User\OAuthAwareUserProviderInterface. So this is what I wrote and then got stuck <?php

How can I write a user provider for HWIOAuthBundle

馋奶兔 提交于 2020-02-24 11:07:11
问题 I want to write a login feature via social networks. if the user is not logged it persists it into the database, if the user exists, log the user in. What should I write into my provider? Docs state : The bundle needs a service that is able to load users based on the user response of the oauth endpoint. If you have a custom service it should implement the interface: HWI\Bundle\OAuthBundle\Security\Core\User\OAuthAwareUserProviderInterface. So this is what I wrote and then got stuck <?php

Unrecognized field: facebookId

蹲街弑〆低调 提交于 2019-12-22 13:34:26
问题 I try to connect symfony 3 with HWIOAUTH Bundle and follow the tutorial https://gist.github.com/danvbe/4476697. file config.yml hwi_oauth: connect: account_connector: my_user_provider firewall_names: [main] fosub: username_iterations: 30 properties: google: googleId facebook: facebookId resource_owners: facebook: type: facebook client_id: *************** client_secret: *************** scope: "" google: type: google client_id: *************** client_secret: *************** scope: "https://www

Symfony2: How to login using OAuth (HWIOAuthBundle) + custom roles (by default and loaded from DB)

岁酱吖の 提交于 2019-12-20 14:15:57
问题 Note: the questions are at the end of this text but I will explain in detail all the context for a better understanding. I'm developing a Symfony2 application consisting of 3 modules: Module for students -> Needs the role ROLE_STUDENT Module for teachers -> Needs the role ROLE_TEACHER Module for administrators -> Needs the role ROLE_ADMIN The role hierarchy is as follows: ROLE_TEACHER: [ROLE_STUDENT] ROLE_ADMIN: [ROLE_TEACHER] Therefore: A student (with ROLE_STUDENT role) only can access to

symfony2 HWIOAuthBundle QQ登录问题

倖福魔咒の 提交于 2019-12-15 17:19:49
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 现行版本 HWIOAuthBundle QQ 登录会出现问题 最近在用HWIOAuthBundle 做第三方QQ登录 会出现bug;就追源码 发现存在一些问题; 估计HWIOAuthBundle没有及时更新;github上还是两年前的; // HWI\Bundle\OAuthBundle\OAuth\ResourceOwner\QQResourceOwner.php; /** * {@inheritDoc} */ public function getUserInformation(array $accessToken = null, array $extraParameters = array()) { /* * 这是原来的;他调用normalizeUrl 方法生成一个URL $url = $this->normalizeUrl($this->options['infos_url'], array( 'oauth_consumer_key' => $this->options['client_id'], 'access_token' => $accessToken['access_token'], 'openid' => $openid, 'format' => 'json', )); /

How to install HWIOAuthBundle in Symfony4.3?

回眸只為那壹抹淺笑 提交于 2019-12-13 20:16:14
问题 If i try install this bundle like it described in docs with command composer require hwi/oauth-bundle php-http/guzzle6-adapter php-http/httplug-bundle i have this error: Problem 1 - Installation request for hwi/oauth-bundle ^0.6.3 -> satisfiable by hwi/oauth-bundle[0.6.3]. - Installation request for php-http/httplug-bundle ^1.16 -> satisfiable by php-http/httplug-bundle[1.16.0]. - php-http/httplug-bundle 1.16.0 requires php-http/client-implementation ^1.0 -> satisfiable by php-http/guzzle6

To path the parameter to OAuth facebook login by symfony2/HWIOAuthBundle

狂风中的少年 提交于 2019-12-13 04:50:54
问题 This question is related to this article I have googled many times and made the problem more precisely. My question is very simple. Can I pass the parameter from here (for example : myStatus=1) <a href="{{ path('hwi_oauth_service_redirect', { 'service' : 'facebook' }) }}" />facebook</a> to this class? FOSUBUserProvider class MyUserBundle\Security\Core\User class FOSUBUserProvider extends BaseClass { protected $container; public function __construct(UserManagerInterface $userManager,

Social login in Symfony2

帅比萌擦擦* 提交于 2019-12-13 02:46:02
问题 Right now, I'm trying to setup some social logins (facebook and twitter) in a website I'm currently developing. But now, I'm stuck in some point. I'm just following HWIOAuthBundle's documentation: https://github.com/hwi/HWIOAuthBundle/blob/master/Resources/doc/3-configuring_the_security_layer.md But I'm stuck at step 3-A. I "can't" understand that point. I'm not experienced in creating services, nor using them... What does the first paraph mean? So guys, do you know any step by step guide to

Symfony2.3 - HWIOAuthBundle Config ServiceNotFoundException

你。 提交于 2019-12-13 02:42:55
问题 I want to install this bundle. I follow all of the steps and I have this error : Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException' with message 'You have requested a non-existent service "hwi_oauth.resource_ownermap.main".' in /home/Project/app/bootstrap.php.cache:1894 Anyone has an idea ? 回答1: I found the solution here : http://www.diegocaprioli.com/adding-hwioauthbundle-to-your-symfony2-project/ You need to configure a ressource