diff --git a/src/main/java/com/covas/Resources/UsersRessources.java b/src/main/java/com/covas/Resources/UsersRessources.java index fa122dd..86cac89 100644 --- a/src/main/java/com/covas/Resources/UsersRessources.java +++ b/src/main/java/com/covas/Resources/UsersRessources.java @@ -29,7 +29,19 @@ public class UsersRessources { private static final Logger LOGGER = Logger.getLogger(UsersRessources.class); @Inject JsonWebToken jwt; - + + ///Function + private Boolean checkUserCookie(String userCookie, UsersEntity users){ + String name = new String(Base64.decode(userCookie), StandardCharsets.UTF_8); + if(!name.equals(users.pseudo) && (!users.status)){ + return false; + } + return true; + } + + /// Appel HTTP + + ///GET @GET @RolesAllowed("Admin") public Response getUsers(){ @@ -73,11 +85,6 @@ public class UsersRessources { } return Response.ok(new UserSingle(user.name, user.pseudo, user.firstName)).build(); } - private Boolean checkUserCookie(String userCookie, UsersEntity users){ - String name = new String(Base64.decode(userCookie), StandardCharsets.UTF_8); - if(!name.equals(users.pseudo) && (!users.status)){ - return false; - } - return true; - } + + }