sivin/ntlm-http-auth
Composer 安装命令:
composer require sivin/ntlm-http-auth
包简介
Extension for Nette Framework: NTLM authenticate for authenticator
README 文档
README
NtlmHttpAuth
- Install via composer
composer require sivin/ntlm-http-auth
- Register extension in
config.neon:
extensions: ntlmHttpAuth: SiViN\NtlmHttpAuth\DI\NtlmHttpAuthExtension
3, Tell which presenters should not be secured (in case no presenter name given, all presenters are secured). Format - Module:Presenter:
ntlmHttpAuth:
excludedPresenters: [Front:Nonsecured] # Exlude presenter class App\FrontModule\Presenters\NonsecuredPresenter
4, Implement SiViN\NtlmHttpAuth\INtlmAuthenticator to your authenticator
Inconfig.neon:
services: authenticator: NtlmAuthenticator
File NtlmAuthenticator.php:
class NtlmAuthenticator implements \Nette\Security\IAuthenticator, \SiViN\NtlmHttpAuth\INtlmAuthenticator { function authenticate(array $credentials) { ... } function ntlmAuthenticate(\SiViN\NtlmHttpAuth\AuthenticateResult $authenticateResult) { if($this->LdapOrDbOrSomething($authenticateResult->username, $authenticateResult->domain, $authenticateResult->workstation)) { return new \Nette\Security\Identity(...); } else { throw new \Nette\Security\AuthenticationException('User not found', self::IDENTITY_NOT_FOUND); } } }
统计信息
- 总下载量: 31
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-01-29