spomky-labs/oauth2-server-authorization-endpoint-bundle

此包已被废弃且不再维护。作者建议使用 spomky-labs/oauth2-server-bundle 包。

Symfony2 OAuth2 服务器授权端点包


README

Scrutinizer Code Quality Build Status HHVM Status PHP 7 ready

SensioLabsInsight

Latest Stable Version Total Downloads Latest Unstable Version License

此包为您的 OAuth2 服务器提供授权端点。

它依赖于 OAuth2 接口项目

发布流程

发布流程的描述在这里

先决条件

此包至少需要 PHP 5.4Symfony v2.3

它已在以下版本中成功测试:

  • PHP: PHP 5.4PHP 5.6PHP 7HHVM
  • Symfony: v2.3.xv2.7.x

安装

安装此库的首选方法是依赖 Composer

composer require "spomky-labs/oauth2-server-authorization-endpoint-bundle" "~5.0.0"

启用包

在内核中启用包

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        ...
        new SpomkyLabs\OAuth2ServerAuthorizationEndpointBundle\SpomkyLabsOAuth2ServerAuthorizationEndpointBundle(),
    );
}

配置

sl_oauth2_authorization_endpoint:
    scope_manager: my_scope_manager # The scope manager
    security:
        x_frame_options: deny # Allowed values are 'deny', 'same-origin', an URI or 'null' (header "X-Frame-Options" not added to the responses)
    option:
        enforce_redirect_uri: false # If enabled, all authorization request must have a redirect_uri parameter
        enforce_secured_redirect_uri: false # if enabled, redirect uri scheme must be HTTPS
        enforce_registered_client_redirect_uris: false # if enabled, registered clients must have at least one redirect uri stored
        enforce_state: false # if enabled, the state parameter is mandatory

如何使用

有关更多信息,请参阅 此页面。

贡献

欢迎提出新功能请求、修复错误以及所有其他有助于使此包有用的想法。请 遵循这些最佳实践。

许可

此包在 MIT 许可证下发布。