Skip to content

Commit

Permalink
Migrate project to new organisation.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jan 30, 2020
1 parent 4fe5565 commit da68c60
Show file tree
Hide file tree
Showing 42 changed files with 265 additions and 236 deletions.
5 changes: 1 addition & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@

root = true

[*.{php,inc,module}]
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4

[*.{json,json.dist,yml,yml.dist}]
indent_size = 4
1 change: 0 additions & 1 deletion .github/CODEOWNERS

This file was deleted.

1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

24 changes: 7 additions & 17 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
# https://github.com/probot/settings

branches:
- name: master
protection:
enforce_admins: false
required_pull_request_reviews:
dismiss_stale_reviews: true
require_code_owner_reviews: true
required_approving_review_count: 1
required_status_checks:
contexts:
- "Grumphp"
strict: false
restrictions: null

labels:
- name: bug
color: ee0701
Expand All @@ -36,15 +22,19 @@ labels:
repository:
allow_merge_commit: true
allow_rebase_merge: false
allow_squash_merge: false
allow_squash_merge: true
default_branch: master
description: "CAS Bundle, a standard Symfony bundle for authentication using CAS protocol."
homepage: https://cas-bundle.readthedocs.io/
topics: authentication,cas,psr,single-sign-on
homepage: https://ecphp-cas-bundle.readthedocs.io
topics: authentication,cas,single-sign-on
has_downloads: true
has_issues: true
has_pages: false
has_projects: false
has_wiki: false
name: cas-bundle
private: false

teams:
- name: core
permission: push
91 changes: 47 additions & 44 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,54 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

on:
- pull_request
- push
- pull_request
- push

name: "Continuous Integration"

jobs:
run:
name: "Grumphp"
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
php-versions: ['7.1', '7.2', '7.3', '7.4']

steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 1

- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extensions: xdebug

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader

- name: Run Grumphp
run: vendor/bin/grumphp run
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

- name: Scrutinizer
run: vendor/bin/ocular code-coverage:upload --format=php-clover build/logs/clover.xml
run:
name: "Grumphp"
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
php-versions: ['7.1', '7.2', '7.3', '7.4']

steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 1

- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extensions: xdebug,mbstring

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader

- name: Run Grumphp
run: vendor/bin/grumphp run
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

- name: Scrutinizer
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
continue-on-error: true
29 changes: 29 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2020, ECPHP
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2 changes: 2 additions & 0 deletions MAINTAINERS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
From October 2019:
- Pol Dellaiera: https://github.com/loophp
23 changes: 10 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
[![Latest Stable Version](https://img.shields.io/packagist/v/drupol/cas-bundle.svg?style=flat-square)](https://packagist.org/packages/drupol/cas-bundle)
[![GitHub stars](https://img.shields.io/github/stars/drupol/cas-bundle.svg?style=flat-square)](https://packagist.org/packages/drupol/cas-bundle)
[![Total Downloads](https://img.shields.io/packagist/dt/drupol/cas-bundle.svg?style=flat-square)](https://packagist.org/packages/drupol/cas-bundle)
[![Build Status](https://img.shields.io/travis/drupol/cas-bundle/4.4.svg?style=flat-square)](https://travis-ci.org/drupol/cas-bundle)
[![Scrutinizer code quality](https://img.shields.io/scrutinizer/quality/g/drupol/cas-bundle/4.4.svg?style=flat-square)](https://scrutinizer-ci.com/g/drupol/cas-bundle/?branch=4.4)
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/drupol/cas-bundle/4.4.svg?style=flat-square)](https://scrutinizer-ci.com/g/drupol/cas-bundle/?branch=4.4)
[![Mutation testing badge](https://badge.stryker-mutator.io/github.com/drupol/cas-bundle/4.4)](https://stryker-mutator.github.io)
[![Read the Docs](https://img.shields.io/readthedocs/cas-bundle?style=flat-square)](https://cas-bundle.readthedocs.io/)
[![License](https://img.shields.io/packagist/l/drupol/cas-bundle.svg?style=flat-square)](https://packagist.org/packages/drupol/cas-bundle)
[![Say Thanks!](https://img.shields.io/badge/Say-thanks-brightgreen.svg?style=flat-square)](https://saythanks.io/to/drupol)
[![Donate!](https://img.shields.io/badge/Donate-Paypal-brightgreen.svg?style=flat-square)](https://paypal.me/drupol)

[![Latest Stable Version](https://img.shields.io/packagist/v/ecphp/cas-bundle.svg?style=flat-square)](https://packagist.org/packages/ecphp/cas-bundle)
[![GitHub stars](https://img.shields.io/github/stars/ecphp/cas-bundle.svg?style=flat-square)](https://packagist.org/packages/ecphp/cas-bundle)
[![Total Downloads](https://img.shields.io/packagist/dt/ecphp/cas-bundle.svg?style=flat-square)](https://packagist.org/packages/ecphp/cas-bundle)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/ecphp/cas-bundle/Continuous%20Integration/4.4?style=flat-square)](https://github.com/ecphp/cas-bundle/actions)
[![Scrutinizer code quality](https://img.shields.io/scrutinizer/quality/g/ecphp/cas-bundle/4.4.svg?style=flat-square)](https://scrutinizer-ci.com/g/ecphp/cas-bundle/?branch=4.4)
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/ecphp/cas-bundle/4.4.svg?style=flat-square)](https://scrutinizer-ci.com/g/ecphp/cas-bundle/?branch=4.4)
[![Read the Docs](https://img.shields.io/readthedocs/ecphp-cas-bundle?style=flat-square)](https://ecphp-cas-bundle.readthedocs.io/)
[![License](https://img.shields.io/packagist/l/ecphp/cas-bundle.svg?style=flat-square)](https://packagist.org/packages/ecphp/cas-bundle)

# CAS Bundle

A CAS bundle for Symfony 4 & 5.

Read more on the dedicated documentation site: https://cas-bundle.readthedocs.io/
Read more on the dedicated documentation site: https://ecphp-cas-bundle.readthedocs.io/
12 changes: 6 additions & 6 deletions Resources/config/packages/cas_services.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
cas:
class: drupol\psrcas\Cas
class: EcPhp\CasLib\Cas
arguments:
$serverRequest: '@cas.psrrequest'
$properties: '@cas.configuration'
Expand All @@ -15,16 +15,16 @@ services:
cas.psr17_factory:
class: Nyholm\Psr7\Factory\Psr17Factory

drupol\psrcas\CasInterface: '@cas'
EcPhp\CasLib\CasInterface: '@cas'

cas.configuration:
class: drupol\CasBundle\Configuration\Symfony
class: EcPhp\CasBundle\Configuration\Symfony
arguments:
$properties: '%cas%'
$router: '@router'

cas.userprovider:
class: drupol\CasBundle\Security\Core\User\CasUserProvider
class: EcPhp\CasBundle\Security\Core\User\CasUserProvider

cas.psrhttpfactory:
class: Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory
Expand All @@ -41,7 +41,7 @@ services:
Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface: '@cas.httpfoundationfactory'

cas.guardauthenticator:
class: drupol\CasBundle\Security\CasGuardAuthenticator
class: EcPhp\CasBundle\Security\CasGuardAuthenticator
arguments:
$cas: '@cas'
$uriFactory: '@cas.psr17_factory'
Expand All @@ -56,7 +56,7 @@ services:
factory: [ '@cas.psrhttpfactory', createRequest ]
arguments: [ '@cas.request']

drupol\CasBundle\Controller\:
EcPhp\CasBundle\Controller\:
resource: '@CasBundle/Controller/'
autowire: true
autoconfigure: true
Expand Down
82 changes: 41 additions & 41 deletions Resources/config/packages/dev/cas_bundle.yaml
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
cas:
base_url: https://heroku-cas-server.herokuapp.com/cas
protocol:
login:
path: /login
allowed_parameters:
- service
- renew
- gateway
default_parameters:
service: cas_bundle_homepage
serviceValidate:
path: /p3/serviceValidate
allowed_parameters:
- service
- pgtUrl
- renew
- format
default_parameters:
format: JSON
#pgtUrl: cas_bundle_proxy_callback
logout:
path: /logout
allowed_parameters:
- service
default_parameters:
service: cas_bundle_homepage
proxy:
path: /proxy
allowed_parameters:
- targetService
- pgt
proxyValidate:
path: /p3/proxyValidate
allowed_parameters:
- service
- ticket
- pgtUrl
- format
default_parameters:
format: JSON
#pgtUrl: cas_bundle_proxy_callback
base_url: https://heroku-cas-server.herokuapp.com/cas
protocol:
login:
path: /login
allowed_parameters:
- service
- renew
- gateway
default_parameters:
service: cas_bundle_homepage
serviceValidate:
path: /p3/serviceValidate
allowed_parameters:
- service
- pgtUrl
- renew
- format
default_parameters:
format: JSON
#pgtUrl: cas_bundle_proxy_callback
logout:
path: /logout
allowed_parameters:
- service
default_parameters:
service: cas_bundle_homepage
proxy:
path: /proxy
allowed_parameters:
- targetService
- pgt
proxyValidate:
path: /p3/proxyValidate
allowed_parameters:
- service
- ticket
- pgtUrl
- format
default_parameters:
format: JSON
#pgtUrl: cas_bundle_proxy_callback
8 changes: 4 additions & 4 deletions Resources/config/packages/dev/cas_framework.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
framework:
http_client:
default_options:
verify_peer: false
verify_host: false
http_client:
default_options:
verify_peer: false
verify_host: false
4 changes: 2 additions & 2 deletions Resources/config/routes/dev/cas_bundle.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
cas_bundle:
resource: '@CasBundle/Resources/routing.xml'
prefix: /cas
resource: '@CasBundle/Resources/routing.xml'
prefix: /cas

0 comments on commit da68c60

Please sign in to comment.