mirror of
http://124.126.16.154:8888/singularity/hyperf-saml.git
synced 2026-01-15 07:35:07 +08:00
feat(sp.assertion): 引入了 UserResource
This commit is contained in:
@@ -15,7 +15,7 @@ use Hyperf\HttpServer\Contract\ResponseInterface;
|
||||
use LightSaml\Model\Protocol\LogoutResponse;
|
||||
use LightSaml\Model\Protocol\Response;
|
||||
use LightSaml\SamlConstants;
|
||||
use Singularity\HyperfDevelopmentKit\Account\Model\AbstractUser;
|
||||
use Singularity\HyperfDevelopmentKit\Account\Resource\User;
|
||||
use Singularity\HyperfDevelopmentKit\Utils\Exceptions\Unauthorized;
|
||||
use Singularity\HyperfDevelopmentKit\Utils\Exceptions\ValidateException;
|
||||
use Singularity\HyperfSaml\Constants\SamlErrorCode;
|
||||
@@ -73,12 +73,12 @@ class Assertion
|
||||
*
|
||||
* @param \LightSaml\Model\Protocol\Response $response
|
||||
*
|
||||
* @return \Singularity\HyperfDevelopmentKit\Account\Model\AbstractUser
|
||||
* @return \Singularity\HyperfDevelopmentKit\Account\Resource\User
|
||||
*/
|
||||
public function consumeResponse(Response $response): AbstractUser
|
||||
public function consumeResponse(Response $response): User
|
||||
{
|
||||
$user = $this->base->getAllAttributes($response);
|
||||
return new AbstractUser($user);
|
||||
return new User($user);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user