Commit 04cb4cbd authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Initial commit

parents
Loading
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+2 −0
Original line number Diff line number Diff line
vendor/
.idea

.gitlab-ci.yml

0 → 100644
+23 −0
Original line number Diff line number Diff line
stages:
- tests
- publish

cache:
  key: ${CI_COMMIT_REF_SLUG}
  paths:
  - vendor/

#unit-tests:
#  stage: tests
#  script:
#    - composer install --no-interaction --no-suggest --no-progress
#    - php vendor/bin/phpunit --coverage-text=coverage.txt --colors=never
#  artifacts:
#    paths:
#      - coverage.txt

update-satis:
  stage: publish
  script:
    - curl https://gest.unicaen.fr/packagist/update

CHANGELOG.md

0 → 100644
+6 −0
Original line number Diff line number Diff line
CHANGELOG
=========

1.0.0
-----
- 

Module.php

0 → 100644
+36 −0
Original line number Diff line number Diff line
<?php

namespace UnicaenAuthToken;

use Zend\Mvc\ModuleRouteListener;
use Zend\Mvc\MvcEvent;
use Zend\Config\Factory as ConfigFactory;

class Module
{
    public function onBootstrap(MvcEvent $e)
    {
        $eventManager        = $e->getApplication()->getEventManager();
        $moduleRouteListener = new ModuleRouteListener();
        $moduleRouteListener->attach($eventManager);
    }

    public function getConfig()
    {
        $paths = array_merge(
            [__DIR__ . '/config/module.config.php']
        );
        return ConfigFactory::fromFiles($paths);
    }

    public function getAutoloaderConfig(): array
    {
        return array(
            'Zend\Loader\StandardAutoloader' => array(
                'namespaces' => array(
                    __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
                ),
            ),
        );
    }
}

composer.json

0 → 100644
+26 −0
Original line number Diff line number Diff line
{
  "name": "unicaen/auth-token",
  "description": "Authentification à l'aide d'un token",
  "repositories": [
    {
      "type": "composer",
      "url": "https://gest.unicaen.fr/packagist"
    }
  ],
  "require": {
    "unicaen/app": "^3.0",
    "unicaen/auth": "^3.0",
    "ramsey/uuid": "^3.7"
  },
  "require-dev": {
    "phpunit/phpunit": "^5.6"
  },
  "autoload": {
    "psr-0": {
      "UnicaenAuthToken": "src/"
    },
    "classmap": [
      "./Module.php"
    ]
  }
}
Loading