amend responseHeader
This commit is contained in:
parent
53c9df92f4
commit
c439b2ad63
|
@ -213,14 +213,13 @@ class Authenticator
|
||||||
* @method generateResponseHeader
|
* @method generateResponseHeader
|
||||||
* @public
|
* @public
|
||||||
* @param MetaTech\PwsAuth\Token $token
|
* @param MetaTech\PwsAuth\Token $token
|
||||||
* @param str $login
|
|
||||||
* @return str
|
* @return str
|
||||||
*/
|
*/
|
||||||
public function generateResponseHeader(Token $token, $login)
|
public function generateResponseHeader(Token $token)
|
||||||
{
|
{
|
||||||
return hash(
|
return hash(
|
||||||
self::DEFAULT_ALGO,
|
self::DEFAULT_ALGO,
|
||||||
$this->formatDate($token->getDate()) . $this->getUserSalt($login) . $token->getValue()
|
$this->formatDate($token->getDate()) . $this->getUserSalt('') . $token->getValue()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,12 +227,11 @@ class Authenticator
|
||||||
* @method checkResponseHeader
|
* @method checkResponseHeader
|
||||||
* @public
|
* @public
|
||||||
* @param MetaTech\PwsAuth\Token $token
|
* @param MetaTech\PwsAuth\Token $token
|
||||||
* @param str $login
|
* @return bool
|
||||||
* @return []
|
|
||||||
*/
|
*/
|
||||||
public function checkResponseHeader(Token $token, $login, $responseToken)
|
public function checkResponseHeader(Token $token, $responseToken)
|
||||||
{
|
{
|
||||||
return $this->generateResponseHeader($token, $login) == $responseToken;
|
return $this->generateResponseHeader($token) == $responseToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
Loading…
Reference in New Issue
Block a user