mirror of
http://124.126.16.154:8888/singularity/hyperf-saml.git
synced 2026-01-15 07:15:05 +08:00
fix(saml): 尝试兼容获取 originToken 失败的问题
Signed-off-by: 李东云 <dongyun.li@luxcreo.ai>
This commit is contained in:
@@ -251,7 +251,7 @@ class Base extends AbstractService
|
||||
'email' => $this->getEmailFromResponse($response),
|
||||
'avatar' => $this->getAvatarFromResponse($response),
|
||||
'hasPassword' => $this->getPassFromResponse($response),
|
||||
'originToken' => $this->getTokenFromResponse($response),
|
||||
'originToken' => $this->getTokenFromResponse($response) ?? $this->getTokenFromQuery(),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -397,6 +397,16 @@ class Base extends AbstractService
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 从 query 中获取 token
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getTokenFromQuery(): ?string
|
||||
{
|
||||
return $this->request->query('token');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取 RelayState
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user