qbnk/frontend-components-saml2
Composer 安装命令:
composer require qbnk/frontend-components-saml2
包简介
Saml2 package, part of Frontend Components for Slim-based frontends.
README 文档
README
A part of the qbnk/frontend-components package. This package contains a saml2 authentication adapter which is used to log the user in via an external Identity provider
use Slim\App;
use OneLogin\Saml2\Constants;
$app = new App();
$adapter = new Saml2($app, $settings);
$adapter->authenticate($returnUrl);
Register routes for the Slim router
$adapter->registerRoutes($app);
Settings sample
$settings = [
'addQBankAccount' => true,
'responseUsername' => 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress',
'responseFirstname' => 'FirstName',
'responseLastname' => 'LastName',
'includeUserDataCookie' => true, // For them SPA's
'jit' => [
// If enabled, these settings will override the 'addQBankAccount' flag
'enabled' => true,
'userType' => 'Frontend',
'responseGroups' => 'Groups',
'groupMapping' => [
'qbankDefaultGroups' => [
{QBankGroupId1}, {QBankGroupId2}
],
'adGroup1' => [
{QBankGroupId3}, {QBankGroupId4}
],
'adGroup2' => [
{QBankGroupId3}, {QBankGroupId5}
]
]
],
'security' => [
'wantNameId' => true,
'nameIdEncrypted' => false,
'authnRequestsSigned' => false,
'logoutRequestSigned' => false,
'logoutResponseSigned' => false,
'signMetadata' => true,
'wantMessagesSigned' => true,
'wantAssertionsSigned' => true,
'wantNameIdEncrypted' => false,
'requestedAuthnContext' => false,
'wantXMLValidation' => true,
],
'contactPerson' => [
'technical' => [
'givenName' => 'QBNK Tech',
'emailAddress' => 'tech@qbank.se'
],
'support' => [
'givenName' => 'QBNK Support',
'emailAddress' => 'support@qbank.se'
],
],
'organization' => [
'en-US' => [
'name' => 'QBNK Company',
'displayname' => 'QBNK Company',
'url' => 'https://qbank.se/'
],
],
'strict' => false,
'debug' => true,
'sp' => [
'entityId' => '**FILLED IN AUTOMATICALLY**',
'assertionConsumerService' => [
'url' => '**FILLED IN AUTOMATICALLY**',
'binding' => Constants::BINDING_HTTP_POST,
],
'singleLogoutService' => [
'url' => '**FILLED IN AUTOMATICALLY**',
'binding' => Constants::BINDING_HTTP_REDIRECT,
],
'NameIDFormat' => Constants::NAMEID_UNSPECIFIED
],
'idp' => [
'entityId' => '{url}',
'singleSignOnService' => [
'url' => '{url}',
'binding' => Constants::BINDING_HTTP_POST
],
'x509cert' => '{base64}'
]
]
统计信息
- 总下载量: 1.11k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2018-12-05