securite token jwt

This commit is contained in:
Blandine Bajard 2022-01-19 15:18:21 +01:00
parent c464ed495b
commit f164000cc8
19 changed files with 719 additions and 10 deletions

View file

@ -0,0 +1,15 @@
package fr.organizee.exception;
/**
* Classe personnalisée pour ©rer un message si l'utilisateur (User) existe en Base de données
*/
public class ExistingUsernameException extends Exception {
private static final long serialVersionUID = 1L;
@Override
public String getMessage()
{
return "Désolé, l'utilisateur existe déjà en base de données !";
}
}

View file

@ -0,0 +1,15 @@
package fr.organizee.exception;
/**
* Specific exception that should be thrown when user credentials are not valid.
*/
public class InvalidCredentialsException extends Exception {
private static final long serialVersionUID = -6483691380297851921L;
@Override
public String getMessage()
{
return "L'accréditation est invalide !";
}
}

View file

@ -0,0 +1,17 @@
package fr.organizee.exception;
/**
* Specific exception that should be thrown when a JWT has an invalid format.
*/
public class InvalidJWTException extends Exception {
private static final long serialVersionUID = -6546999838071338632L;
@Override
public String getMessage()
{
return "Le format JWT est invalide !";
}
}