p4bgroup/ldap-jwt-authentication
最新稳定版本:v1.1.1
Composer 安装命令:
composer require p4bgroup/ldap-jwt-authentication
包简介
JWT Authentication using LDAP connections
README 文档
README
JWT Authentication service using LDAP connections for Phalcon Projects
Usage
$ldap = new Laminas\Ldap\Ldap([..]); $authService = new AuthenticationService($ldap); $jwtTokensService = new JWTTokensService($algorithm, $encodeKey, $decodeKey); /** @param P4BGroup\Authentication\User $user */ $user = $authService->authenticateUser($username, $password, $userBaseDn); $claims = new P4BGroup\Authentication\Claims(); $claims->setData($user->toArray()) ->setSubject(Claims::SUBJECT_REFRESH) ->setExpirationTime(new DateTime("+10 minutes")) $accessToken = $jwtTokensService->encode($claims); $refreshToken = $jwtTokensService->encode($claims->setSubject(Claims::SUBJECT_REFRESH)->setExpirationTime(new DateTime("+1 hour"));
统计信息
- 总下载量: 313
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-04-06