Commit 6ec4a3b1 authored by Thibaut Vallee's avatar Thibaut Vallee
Browse files

Release: mise à jour version API 0.0.21

parent 8570f688
Loading
Loading
Loading
Loading
Loading
+4 −0
Changes for CHANGELOG.md: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
#CHANGELOG
============
0.0.21 (03/04/2026)
------------------
- Front : configuration possible du formulaire d'authentification (avec activation ou non du LDAP, CAS)

0.0.20 (31/03/2026)
------------------
- CAS coté front
+1 −1
Changes for api/.version: 1 added line, 1 removed line.
Original line number Diff line number Diff line
0.0.20
0.0.21
+47 −0
Changes for frontend/documentations/Components.md: 47 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -32,6 +32,53 @@ import {LoginButton} from "@unicaen/authentification";
</template>
```

Une partie du formulaire d'authentification est configurable par des propriété du composant:
- title : titre du formulaire
- useLdap, ldapBtnLabel, ldapBtnIcone et ldapBtnColor qui permettent de configurer l'authentification LDAP
- useCas, casBtnLabel, casBtnIcone et casBtnColor qui permettent de configurer l'authentification par CAS
- skipForm : booléen par défaut à false qui permet si l'on utilise uniquement l'authentification CAS de bypasser la modal et d'être directement envoyée vers le CAS
- formLoginLabel, formPasswordLabel, formSubmitLabel, formSubmitColor, formCancelLabel, formCancelColor qui permettent de configurer le formulaire d'authentification

Par défaut, ni le LDAP, ni le CAS ne sont activé. C'est un formulaire type d'authentification local qui est proposé. (note : si coté API, on a définit l'authentification LDAP, se formulaire permet malgrés-tout d'effectuer une authentification LDAP )
Par ailleur, l'authentification LDAP permet également coté api de s'authentifier avec des comptes locaux.

Choix fait de laisser à chaque application l'affichage d'information lorsque l'utilisateur se connecte/deconnecte.
Celà passe par la generation de 3 events du composant :
- authentification:success
- authentification:failure
- authentification:logout


Exemple :
```
    <LoginButton class="q-mr-sm"
                 :use-ldap="true" :use-cas="true"
                 ldapBtnLabel="Authentification LDAP"
                 ldapBtnIcone="fas fa-smile"
                 ldapBtnColor="warning"
         @authentification:success="onAuthentificationSuccess"
         @authentification:failure="onAuthentificationFailure"
         @authentification:logout="onAuthentificationLogout"/>
         
<scripts setup>
import {LoginButton} from "@unicaen/authentification";
import {Notify} from "quasar";

 function onAuthentificationSuccess(){
    Notify.create({ type: 'positive', message: 'Connexion réussi !' })
}
function onAuthentificationFailure(error){
    Notify.create({ type: 'negative', message: error })
}
function onAuthentificationLogout(){
    Notify.create({ type: 'info', message: "Vous avez été déconnecté" })
}
</script>


```


## CasCallBack

L'authentification via le CAS passe par plusieurs étapes
+2 −2
Changes for frontend/package-lock.json: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
{
  "name": "@unicaen/authentification",
  "version": "0.0.20",
  "version": "0.0.21",
  "lockfileVersion": 3,
  "requires": true,
  "packages": {
    "": {
      "name": "@unicaen/authentification",
      "version": "0.0.20",
      "version": "0.0.21",
      "devDependencies": {
        "@quasar/vite-plugin": "^1.9.0",
        "@vitejs/plugin-vue": "^5.2.3",
+1 −1
Changes for frontend/package.json: 1 added line, 1 removed line.
Original line number Diff line number Diff line
{
  "name": "@unicaen/authentification",
  "version": "0.0.20",
  "version": "0.0.21",
  "main": "dist/unicaen-authentification.umd.js",
  "module": "dist/unicaen-authentification.es.js",
  "publishConfig": {
Loading