示例#1
0
 private function getKeyContainer() : KeyContainer
 {
     return (new KeyContainer())->addKey(256, Algorithm::HMAC_SHA_256(), new Secret('HS256'))->addKey(384, Algorithm::HMAC_SHA_384(), new Secret('HS384'))->addKey(512, Algorithm::HMAC_SHA_512(), new Secret('HS512'))->addKey('HS256', Algorithm::HMAC_SHA_256(), new Secret('HS256'))->addKey('HS384', Algorithm::HMAC_SHA_384(), new Secret('HS384'))->addKey('HS512', Algorithm::HMAC_SHA_512(), new Secret('HS512'))->addKey('last', Algorithm::NONE(), new Secret(''));
 }
示例#2
0
文件: JWTTest.php 项目: firehed/jwt
 private function getKeyContainer() : KeyContainer
 {
     return (new KeyContainer())->addKey(1, Algorithm::HMAC_SHA_256(), new Secret('secret'))->addKey(2, Algorithm::HMAC_SHA_384(), new Secret('secret'))->addKey(3, Algorithm::HMAC_SHA_512(), new Secret('secret'))->addKey('HS256', Algorithm::HMAC_SHA_256(), new Secret('secret'))->addKey('HS384', Algorithm::HMAC_SHA_384(), new Secret('secret'))->addKey('HS512', Algorithm::HMAC_SHA_512(), new Secret('secret'))->addKey('none', Algorithm::NONE(), new Secret(''))->setDefaultKey(1);
 }