WSSE 身份验证中的编译错误


Compile Error in wsse authentication

我正在使用symfony书 http://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html 中的自定义身份验证提供程序,并且正在测试我的代码。如果书中所说的是正确的,那么 wsse 身份验证应该可以正常工作,但我收到一个不熟悉的错误:

编译错误:WSSE UserToken::getCredentials() 的声明必须是 兼容 Symfony''Component''Security''Core''Authentication''Token''TokenInterface::getCredentials()

我知道我在某个地方搞砸了...

检查您的方法参数及其类型和默认值(也称为"方法签名")是否与 TokenInterface 中的相同。