Skip to content

Commit

Permalink
Merge branch 'add-methods-ecasuser' into 'main'
Browse files Browse the repository at this point in the history
Add get methods to EcasUser class

See merge request ecphp/laravel-ecas!10
  • Loading branch information
drupol committed Nov 14, 2024
2 parents d4b2fed + cc3be4c commit 2126229
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Auth/User/EcasUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ public function get(string $key, $default = null)
return $this->user->get($key, $default);
}

public function getAssuranceLevel(): ?string
{
return $this->user->getAttribute('assuranceLevel');
}

public function getAttribute(string $key, $default = null)

Check failure on line 38 in src/Auth/User/EcasUser.php

View workflow job for this annotation

GitHub Actions / Unit Tests (ubuntu-latest, 8.1)

Method EcPhp\LaravelEcas\Auth\User\EcasUser::getAttribute() has no return type specified.

Check failure on line 38 in src/Auth/User/EcasUser.php

View workflow job for this annotation

GitHub Actions / Unit Tests (ubuntu-latest, 8.1)

Method EcPhp\LaravelEcas\Auth\User\EcasUser::getAttribute() has parameter $default with no type specified.

Check failure on line 38 in src/Auth/User/EcasUser.php

View workflow job for this annotation

GitHub Actions / Unit Tests (ubuntu-latest, 8.3)

Method EcPhp\LaravelEcas\Auth\User\EcasUser::getAttribute() has no return type specified.

Check failure on line 38 in src/Auth/User/EcasUser.php

View workflow job for this annotation

GitHub Actions / Unit Tests (ubuntu-latest, 8.3)

Method EcPhp\LaravelEcas\Auth\User\EcasUser::getAttribute() has parameter $default with no type specified.

Check failure on line 38 in src/Auth/User/EcasUser.php

View workflow job for this annotation

GitHub Actions / Unit Tests (ubuntu-latest, 8.2)

Method EcPhp\LaravelEcas\Auth\User\EcasUser::getAttribute() has no return type specified.

Check failure on line 38 in src/Auth/User/EcasUser.php

View workflow job for this annotation

GitHub Actions / Unit Tests (ubuntu-latest, 8.2)

Method EcPhp\LaravelEcas\Auth\User\EcasUser::getAttribute() has parameter $default with no type specified.

Check failure on line 38 in src/Auth/User/EcasUser.php

View workflow job for this annotation

GitHub Actions / Unit Tests (macOS-latest, 8.1)

Method EcPhp\LaravelEcas\Auth\User\EcasUser::getAttribute() has no return type specified.

Check failure on line 38 in src/Auth/User/EcasUser.php

View workflow job for this annotation

GitHub Actions / Unit Tests (macOS-latest, 8.1)

Method EcPhp\LaravelEcas\Auth\User\EcasUser::getAttribute() has parameter $default with no type specified.

Check failure on line 38 in src/Auth/User/EcasUser.php

View workflow job for this annotation

GitHub Actions / Unit Tests (macOS-latest, 8.2)

Method EcPhp\LaravelEcas\Auth\User\EcasUser::getAttribute() has no return type specified.

Check failure on line 38 in src/Auth/User/EcasUser.php

View workflow job for this annotation

GitHub Actions / Unit Tests (macOS-latest, 8.2)

Method EcPhp\LaravelEcas\Auth\User\EcasUser::getAttribute() has parameter $default with no type specified.

Check failure on line 38 in src/Auth/User/EcasUser.php

View workflow job for this annotation

GitHub Actions / Unit Tests (macOS-latest, 8.3)

Method EcPhp\LaravelEcas\Auth\User\EcasUser::getAttribute() has no return type specified.

Check failure on line 38 in src/Auth/User/EcasUser.php

View workflow job for this annotation

GitHub Actions / Unit Tests (macOS-latest, 8.3)

Method EcPhp\LaravelEcas\Auth\User\EcasUser::getAttribute() has parameter $default with no type specified.
{
return $this->user->getAttribute($key, $default);
Expand Down Expand Up @@ -57,6 +62,21 @@ public function getAuthPassword(): ?string

public function getAuthPasswordName(): void {}

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();
Expand Down

0 comments on commit 2126229

Please sign in to comment.