Commit 1428ca34 authored by Thibaut Vallee's avatar Thibaut Vallee
Browse files

création de la lib

parent f0aeb8e3
Loading
Loading
Loading
Loading

CHANGELOG.md

0 → 100644
+5 −0
Changes for CHANGELOG.md: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
CHANGELOG

0.0.1 (06/03/2026)
------------------
- création du dépot
+13 −46
Changes for README.md: 13 added lines, 46 removed lines.
Original line number Diff line number Diff line
# [WIP] Ce dépôt est pour l'instant à but de test uniquement
# Unicaen Authentification

# Unicaen Skeleton

Ce dépôt est un monorepo contenant :

- Un bundle **API Platform** pour la gestion des paramètres.
- Un composant **Vue.js** associé pour l'interface utilisateur.

## Structure du projet

@@ -27,7 +21,7 @@ Ce dépôt est un monorepo contenant :

1. Composer install
    ```bash
    composer install unicaen-modern/parametre
    composer install unicaen-modern/authentification
    ```

### Frontend
@@ -39,59 +33,32 @@ Ce dépôt est un monorepo contenant :

2. Installer le package
    ```bash
    npm install @unicaen/parametre
    npm install @unicaen/authentification
    ```

3. Importer et déclarer le composant dans votre projet Vue.js, généralement main.js :
    ```javascript
   import { ParametrePlugin } from '@unicaen/parametre'
   import { AuthentificationPlugin } from '@unicaen/authentification'
   
   // Create app etc...
   
   app.use(ParametrePlugin, { axios: axiosInstance})
   app.use(AuthentificationPlugin, { axios: axiosInstance})
   ```
   Vous devez passer votre instance axios à l'option `axios` pour que le composant puisse communiquer avec l'API en utilisant votre système d'authentification.


4. La bibliothèque fournit aussi un object router ParametreRouter qui intégre directement le routing vers /parametre. Vous pouvez l'importer et l'utiliser comme suit :
    ```javascript
    import { ParametreRouter } from '@unicaen/parametre'
    
    // Create app etc...
    const router = createRouter({
        history: createWebHistory(),
        routes: [...ParametreRouter]
    })
    app.use(router)
    ```
   
5. Ou gérer vous même l'utilisation du composant ParametrePage pour l'intégrer comme vous le souhaitez dans votre projet.
    ```javascript
    import { ParametrePage } from '@unicaen/parametre'
    
    // Create app etc...
    
    app.component('ParametrePage', ParametrePage)
    ```
    ```javascript
    import { createRouter, createWebHistory } from 'vue-router'
    import { ParametrePage } from '@unicaen/parametre'
   
   const router = createRouter({
      history: createWebHistory(),
      routes: {
           path: '/parametre',
           component: ParametrePage
      }
   })
   // Create app etc...
   app.use(router)
     ```

## Contribution

Les contributions sont les bienvenues. Merci de suivre les bonnes pratiques de développement et de soumettre vos pull requests.

## Dévellopement à venir / faire

- Authentification LDAP (en cours)
- Authentification CAS
- Authentification SHIBB
- Usurpation
- Autres fonctionnalité présente actuellement dans UnicaenAuthentification ?

## Licence

Ce projet est sous licence MIT.
 No newline at end of file

api/.version

0 → 100644
+1 −0
Changes for api/.version: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
0.0.1
+8 −5
Changes for api/composer.json: 8 added lines, 5 removed lines.
Original line number Diff line number Diff line
{
    "name": "unicaen-modern/skeleton",
    "name": "unicaen-modern/Authentification",
    "type": "symfony-bundle",
    "description": "Bundle API Platform pour Unicaen Skeleton",
    "description": "Unicaen Authentification",
    "repositories": [
        {
            "type": "composer",
@@ -11,13 +11,16 @@
    "license": "MIT",
    "autoload": {
        "psr-4": {
            "Unicaen\\Skeleton\\": "src/"
            "Unicaen\\Authentification\\": "src/"
        }
    },
    "require": {
        "php": "^8.2",
        "doctrine/orm": "^3.3",
        "api-platform/core": "^4.1"
        "api-platform/symfony": "*",
        "api-platform/core": "^4.2",
        "unicaen-modern/utilisateur": "^0.4",
        "unicaen-modern/privilege": "^1.4"
    },
    "require-dev": {
        "friendsofphp/php-cs-fixer": "^3.75",
@@ -26,7 +29,7 @@
    "extra": {
        "symfony": {
            "bundle": {
                "Unicaen\\Skeleton\\UnicaenSkeletonBundle": "all"
                "Unicaen\\Authentification\\UnicaenAuthentificationBundle": "all"
            }
        }
    }
+1 −1
Changes for api/config/services.yaml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -3,5 +3,5 @@ services:
    autowire: true
    autoconfigure: true

  Unicaen\Skeleton\:
  Unicaen\Authentification\:
    resource: '../src/*'
 No newline at end of file
Loading