Comments (6)
an example for this would be usefull
from etcpasswdoauthbundle.
Please, would be great !
from etcpasswdoauthbundle.
after trying around with verious methods, I don't think it's easy to use this with FOSUserBundle.
And as the maintainer doesn't respond about anything here, I'll mark this repo as dead for me. I'll have to live with email auth for now...
from etcpasswdoauthbundle.
Hi !
finally, I can find a solution that work for me. I declare the fos_user as user provider on security.yml. Then I wrote an AuthenticationProvider (based on AuthenticationProvider from etcpasswdoauthbundle), with authenticate method thats make the trick.
$data = $token->getResponse()->getJson();
try {
$user = $this->userProvider->loadUserByUsername($token->getUsername());
// compare user properties with oauth data for updates
} catch (UsernameNotFoundException $e) {
// Create user with oauth data
}
At last, configure the "etcpasswd_oauth.authentication.provider.oauth.class" as my AuthenticationProvider class
I hope that this help you !
j
from etcpasswdoauthbundle.
Sweet, thanks. Helped me a lot. As I'm just beginning with Sf2, where can I override the configuration of the AuthProvider Class without doing it in the OAuthBundle?
from etcpasswdoauthbundle.
In your bundle. For example:
src/Acme/YourBundle/Security/Core/Authentication/Provider/OAuthProvider.php (copy the OAuthProvider class from etcpasswd and develop from this)
Then in, your services.yml (or xml) src/Acme/YourBundle/Resources/config/services.yml define a parameter:
parameters:
etcpasswd_oauth.authentication.provider.oauth.class: Acme\YourBundle\Security\Core\Authentication\Provider\OAuthProvider
j
from etcpasswdoauthbundle.
Related Issues (9)
- OAuth1
- Provide access to api tokens to perform decorated requests
- Yahoo Makes things a little complicated HOT 2
- Target path miss
- Stop overridion requiresAuthentication
- Add possibility authenticate without UserProvider
- We need an AuthenticationEntryPointInterface for handle AccessDenied on no logged users ?
- Need to change function signature in OAuthListener in Symfony >=2.1.*
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from etcpasswdoauthbundle.