承接 mehr-als-nix/zf2-saml 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mehr-als-nix/zf2-saml

Composer 安装命令:

composer require mehr-als-nix/zf2-saml

包简介

SAML Authentication module for ZF-2.

README 文档

README

SAML authentication module for ZF2.

Build Status

This module uses onelogin/php-saml internally and wrap the function in services.

Installation

Just require mehr-als-nix/zf-saml in your composer.json.

Enable it in application.config.php

    'modules' => array (
        // ---8<---
        'ZF\ApiProblem',
        'ZF\ContentNegotiation',
        'MehrAlsNix\ZF\SAML',
        // --->8---
    ),

Configuration

Copy saml.local.php.dist to config/autoload/saml.local.php

Services

MehrAlsNix\ZF\SAML\Service\SAML2Auth

Provides an instance of OneLogin_Saml2_Auth

MehrAlsNix\ZF\SAML\Service\SAML2AuthnRequest

Provides an instance of OneLogin_Saml2_AuthnRequest

MehrAlsNix\ZF\SAML\Service\SAML2Metadata

Provides an instance of OneLogin_Saml2_Metadata

MehrAlsNix\ZF\SAML\Service\SAML2Response

Provides an instance of OneLogin_Saml2_Response

MehrAlsNix\ZF\SAML\Service\SAML2Settings

Provides an instance of OneLogin_Saml2_Settings

API protection

Assume $this->samlAuth contains an instance of OneLogin_Saml2_Auth, then you would be able to protect your API.

    if (!$this->samlAuth->isAuthenticated()) {
        $this->getResponse()->setStatusCode(401);
        return;
    }

统计信息

  • 总下载量: 60
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-25