Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
use PVE::SafeSyslog;
use PVE::AccessControl;
+use PVE::Auth::Plugin;
use PVE::TokenConfig;
use PVE::RESTHandler;
];
}
- my (undef, undef, $realm) = PVE::AccessControl::verify_username($user, 1);
- if (defined($realm) && exists($domainids->{$realm})) {
- $entry->{'realm-type'} = $domainids->{$realm}->{type};
+ if ($user =~ /($PVE::Auth::Plugin::realm_regex)$/) {
+ my $realm = $1;
+ $entry->{'realm-type'} = $domainids->{$realm}->{type} if exists $domainids->{$realm};
}
$entry->{userid} = $user;