Comments (8)
i have this error:
Fatal error: Class 'FR3D\LdapBundle\FR3DLdapBundle' not found in /var/www/Symfony/app/AppKernel.php on line 26
besides, i have this tree in my project: /vendor/bundles/FR3D/LdapBundle/FR3DLdapBundle.php
from fr3dldapbundle.
Hi @symfony24
With Symfony 2.1 you should add the bundle using the Composer package fr3d/ldap-bundle
and add it to your AppKernel as the same way of the rest of bundles.
Anyway in 1.6 and 2.0 branch there are documentation about how to install it with SF 2.1
https://github.com/Maks3w/FR3DLdapBundle/blob/1.6.x/Resources/doc/index.md
https://github.com/Maks3w/FR3DLdapBundle/blob/2.0.x/Resources/doc/index.md
from fr3dldapbundle.
thx a lot, now, i'm trying to authenticate, i have this error:
The credentials you have configured are not valid
this is my config.yml
fos_user:
db_driver: orm
firewall_name: main
user_class: Talan\VpnBundle\Entity\User
fr3d_ldap:
client:
host: 192.168.8.95
port: 389 # Optional
version: 3 # Optional
username: Administrateur
password: Key11ogger
optReferrals: false # Optional
useSsl: true # Enable SSL negotiation. Optional
useStartTls: true # Enable TLS negotiation. Optional
user:
baseDn: dc=talan, dc=local
filter: (&(ObjectClass=Person))
attributes: # Specify ldap attributes mapping [ldap attribute, user object method]
{ ldap_attr: uid, user_method: setUsername } # Default
and my security.yml
security:
providers:
chain_provider:
chain:
providers: [fos_userbundle, fr3d_ldapbundle]
fos_userbundle:
id: fos_user.user_manager
fr3d_ldapbundle:
id: fr3d_ldap.security.user.provider
firewalls:
main:
pattern: ^/
fr3d_ldap: ~
form_login:
provider: chain_provider
always_use_default_target_path: true
default_target_path: /
logout: true
anonymous: true
please help, thank you !
from fr3dldapbundle.
Please edit your message and add markup for format the config as YAML
```yaml
<paste here>
```
Anyway it's not possible to have useSsl and useStartTls enable at the same time, you must choose one of them
from fr3dldapbundle.
no it's not enabled.
security.yml
security:
providers:
chain_provider:
chain:
providers: [fos_userbundle, fr3d_ldapbundle]
fos_userbundle:
id: fos_user.user_manager
fr3d_ldapbundle:
id: fr3d_ldap.security.user.provider
firewalls:
main:
pattern: ^/
fr3d_ldap: ~
form_login:
provider: chain_provider
always_use_default_target_path: true
default_target_path: /
logout: true
anonymous: true
and config.yml
fr3d_ldap:
client:
host: 192.168.8.95
port: 389 # Optional
# version: 3 # Optional
username: cn=Administrateur
password: Key11ogger
# optReferrals: false # Optional
# useSsl: true # Enable SSL negotiation. Optional
# useStartTls: true # Enable TLS negotiation. Optional
user:
baseDn: dc=talan, dc=local
filter: (&(ObjectClass=Person))
attributes: # Specify ldap attributes mapping [ldap attribute, user object method]
- { ldap_attr: uid, user_method: setUsername } # Default
# - { ldap_attr: cn, user_method: setName } # Optional
# - { ldap_attr: ..., user_method: ... } # Optional
- { ldap_attr: mail, user_method: setEmail }
and my User.php
<?php
// src/Acme/UserBundle/Entity/User.php
namespace Talan\VpnBundle\Entity;
use FR3D\LdapBundle\Model\LdapUserInterface;
use FOS\UserBundle\Entity\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="fos_user")
*/
class User extends BaseUser implements LdapUserInterface
{
/**
* @var integer $id
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* Ldap Object Distinguished Name
* @var string $dn
*/
protected $dn;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
public function __construct()
{
parent::__construct();
// your own logic
}
/**
* {@inheritDoc}
*/
public function getDn() {
return $this->dn;
}
/**
* {@inheritDoc}
*/
public function setDn($dn) {
$this->dn = $dn;
}
}
from fr3dldapbundle.
username
should be the full DN or just the username value
from fr3dldapbundle.
great authentication work fine thx to this topic #10
, now i need to manage authorization
For example,
if the user exists within the LDAP group named "Admin", the provided LdapUser object will have the "ROLE_LDAP_ADMIN" role.
what shall i do ?
from fr3dldapbundle.
At this moment I don't provide support for roles but seems that @jkostrz applied a patch for it https://github.com/jkostrz/FR3DLdapBundle
from fr3dldapbundle.
Related Issues (20)
- Drop Zend LDAP in favor of Symfony LDAP HOT 1
- Set user Role depending Ldap group membership HOT 2
- How to set "Username" and "Password" fields from config.yml in the login page HOT 1
- accountCanonicalForm does not appear to be appending correctly HOT 1
- Error when installing the bundle HOT 1
- Retrieve user's list from ldap HOT 1
- Sync mailaddress form ldap after login HOT 2
- override FR3DLdapBundle HOT 1
- Symfony authentication API HOT 1
- New Documentation for LDAP Bundle? HOT 1
- Building symfony container will error if Fosuserbundle is not installed. HOT 1
- Symfony 3.4 deprecation HOT 1
- LdapManager
- Usage of user's LDAP/AD password HOT 4
- Support of Symfony 3 HOT 2
- SECURITY: password logged when exception thrown HOT 1
- Fatal error on login with invalid credentials HOT 1
- v2.0 -> v3.0: handling of empty passwords has changed? HOT 5
- Try using fos_userbundle and fr3d_ldapbundle HOT 1
- Security Hole? Allows anonymous bind if no password submitted by frontend
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 fr3dldapbundle.