Merge pull request 'Fix LDAP authentication failures' (#7) from worktree-ldap-issues into master
Reviewed-on: #7
This commit was merged in pull request #7.
This commit is contained in:
@@ -63,3 +63,10 @@ AWS_BUCKET=
|
||||
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||
|
||||
VITE_APP_NAME="${APP_NAME}"
|
||||
|
||||
LDAP_HOST=openldap
|
||||
LDAP_USERNAME="cn=admin,dc=travel,dc=local"
|
||||
LDAP_PASSWORD=adminpassword
|
||||
LDAP_PORT=389
|
||||
LDAP_BASE_DN="dc=travel,dc=local"
|
||||
LDAP_LOGGING=true
|
||||
|
||||
@@ -64,6 +64,16 @@ class User extends Authenticatable implements FilamentUser, LdapAuthenticatable
|
||||
return $this->hasRole('administrator');
|
||||
}
|
||||
|
||||
public function getLdapGuidColumn(): string
|
||||
{
|
||||
return 'ldap_guid';
|
||||
}
|
||||
|
||||
public function getLdapDomainColumn(): string
|
||||
{
|
||||
return 'ldap_domain';
|
||||
}
|
||||
|
||||
public function emergencyContacts(): HasMany
|
||||
{
|
||||
return $this->hasMany(EmergencyContact::class);
|
||||
|
||||
@@ -18,7 +18,7 @@ new #[Layout('components.layouts.guest')] class extends Component {
|
||||
{
|
||||
$this->validate();
|
||||
|
||||
if (Auth::attempt(['username' => $this->username, 'password' => $this->password], $this->rememberMe)) {
|
||||
if (Auth::attempt(['uid' => $this->username, 'password' => $this->password], $this->rememberMe)) {
|
||||
session()->regenerate();
|
||||
$this->redirectIntended(route('dashboard'), navigate: true);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user