attek/ptesaml
最新稳定版本:1.0.9
Composer 安装命令:
composer require attek/ptesaml
包简介
PTE simple SAML login
README 文档
README
PTE Saml Login
Installation
The preferred way to install this extension is through composer.
To install, either run
composer require attek/ptesaml "1.*"
or add
"attek/ptesaml" : "1.*"
or clone form github
git clone https://github.com/Attek/ptesaml
Usage
Set in config file (web.php)
'components' => [ 'saml' => [ 'class' => 'attek\ptesaml\Saml', 'simpleSamlPath' => '/usr/share/simplesamlphp/', 'config' => 'default-sp' ] ]
Use in code
$saml = Yii::$app->saml; //check is authenticated $saml->isAuthenticated(); //Login $saml->requireAuth(); $saml->getAttributes(); $saml->logout(); $saml->getSamlUser();
Login button
<?php
use attek\ptesaml\SamlAsset;
/* @var yii\web\View $this */
SamlAsset::register($this);
?>
<?= Html::a(Yii::t('app', 'Login'), ['saml'], ['class' => 'btn btn-primary pte-login']) ?>
统计信息
- 总下载量: 1.08k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-09-19