Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Nov 19, 2019
1 parent 0f05c4a commit 2def355
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
38 changes: 23 additions & 15 deletions src/Security/Core/User/EuloginUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,17 @@ public function __construct(array $data)
/**
* {@inheritdoc}
*/
public function __toString()
public function get(string $key, $default = null)
{
return (string) $this->getUsername();
return $this->user->get($key, $default);
}

/**
* {@inheritdoc}
*/
public function getAttribute(string $key, $default = null)
{
return $this->user->getAttribute($key, $default);
}

/**
Expand All @@ -57,7 +65,7 @@ public function getAttributes(): array

public function getDepartmentNumber()
{
// TODO: Implement getDepartmentNumber() method.
return $this->user->getAttribute('departmentNumber');
}

public function getDomain()
Expand Down Expand Up @@ -112,6 +120,7 @@ public function getLoginDate()

public function getOrgId()
{
return $this->user->getAttribute('orgId');
}

/**
Expand All @@ -121,17 +130,12 @@ public function getPassword()
{
}

public function getPgt(): ?string
{
return $this->user->getPgt();
}

/**
* {@inheritdoc}
*/
public function getPgtIOU(): ?string
public function getPgt(): ?string
{
return $this->user->getAttribute('proxyGrantingTicket');
return $this->user->getPgt();
}

/**
Expand Down Expand Up @@ -164,16 +168,17 @@ public function getSso()

public function getStrengths()
{
return $this->user->getAttribute('strength');
return $this->user->getAttribute('strengths');
}

public function getTelephoneNumber()
{
return $this->user->getAttribute('telephone');
return $this->user->getAttribute('telephoneNumber');
}

public function getTeleworkingPriority()
{
return $this->user->getAttribute('teleworkingPriority');
}

public function getTicketType()
Expand All @@ -186,17 +191,20 @@ public function getUid()
return $this->user->getAttribute('uid');
}

public function getUser()
/**
* {@inheritdoc}
*/
public function getUser(): string
{
return $this->user->getUsername();
return $this->user->getUser();
}

/**
* {@inheritdoc}
*/
public function getUsername()
{
return $this->user->getUsername();
return $this->getUser();
}

/**
Expand Down
4 changes: 1 addition & 3 deletions src/Security/Core/User/EuloginUserInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ public function getOrgId();

public function getPgt(): ?string;

public function getPgtIOU(): ?string;

public function getSso();

public function getStrengths();
Expand All @@ -52,5 +50,5 @@ public function getTicketType();

public function getUid();

public function getUser();
public function getUser(): string;
}

0 comments on commit 2def355

Please sign in to comment.