Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit cc3be4c6 authored by Nelson Jose FILIPE MATIAS's avatar Nelson Jose FILIPE MATIAS Committed by Pol Dellaiera
Browse files

feat: add new EcasUser methods

parent 2341448d
Branches
Tags
1 merge request!10Add get methods to EcasUser class
......@@ -30,6 +30,11 @@ final class EcasUser implements Authenticatable
return $this->user->get($key, $default);
}
public function getAssuranceLevel(): ?string
{
return $this->user->getAttribute('assuranceLevel');
}
public function getAttribute(string $key, $default = null)
{
return $this->user->getAttribute($key, $default);
......@@ -57,6 +62,21 @@ final class EcasUser implements Authenticatable
public function getAuthPasswordName() {}
public function getDepartmentNumber(): ?string
{
return $this->user->getAttribute('departmentNumber');
}
public function getEmail(): ?string
{
return $this->user->getAttribute('email');
}
public function getFirstName(): ?string
{
return $this->user->getAttribute('firstName');
}
public function getGroups(): array
{
$attributes = $this->getAttributes();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment