securite token jwt
This commit is contained in:
parent
c464ed495b
commit
f164000cc8
19 changed files with 719 additions and 10 deletions
|
|
@ -0,0 +1,15 @@
|
|||
package fr.organizee.exception;
|
||||
|
||||
/**
|
||||
* Classe personnalisée pour gé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 !";
|
||||
}
|
||||
}
|
||||
|
|
@ -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 !";
|
||||
}
|
||||
}
|
||||
|
|
@ -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 !";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue