1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package com.github.talbotgui.psl.socle.securite.exception;
23
24 import java.io.Serializable;
25
26 import com.github.talbotgui.psl.socle.commun.exception.ExceptionId;
27 import com.github.talbotgui.psl.socle.commun.exception.ExceptionId.NiveauException;
28
29
30 public class SecuriteException extends com.github.talbotgui.psl.socle.commun.exception.AbstractException {
31
32
33 public static final ExceptionId ACCESSTOKEN_NON_ENREGISTRABLE = new ExceptionId("ACCESSTOKEN_NON_ENREGISTRABLE", NiveauException.INFORMATION, 400,
34 "Le token PSL ou l'accessToken OIDC sont invalides ou incohérents entre eux ({})");
35
36
37 public static final ExceptionId DONNEES_AUTHENTIFICATION_INVALIDE = new ExceptionId("DONNEES_AUTHENTIFICATION_INVALIDE",
38 NiveauException.INFORMATION, 400, "Les données de connexion fournies ne permettent pas la création d'un token ({})");
39
40
41 public static final ExceptionId DONNEES_USAGER_INDISPONIBLES = new ExceptionId("DONNEES_USAGER_INDISPONIBLES", NiveauException.INFORMATION, 401,
42 "Les données de l'usager sont indisponibles ({})");
43
44 private static final long serialVersionUID = 1L;
45
46
47 public SecuriteException(ExceptionId id) {
48 super(id);
49 }
50
51
52 public SecuriteException(ExceptionId id, Serializable... parametres) {
53 super(id, parametres);
54 }
55
56
57 public SecuriteException(ExceptionId exceptionId, Throwable nestedException) {
58 super(exceptionId, nestedException);
59 }
60
61
62 public SecuriteException(ExceptionId id, Throwable nestedException, Serializable... parametres) {
63 super(id, nestedException, parametres);
64 }
65 }