Ignore:
Timestamp:
10/12/24 21:32:15 (5 weeks ago)
Author:
macagaso <gasoskamarija@…>
Branches:
master
Parents:
743de55
Message:

Updated version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/finki/it/terapijamkbackend/spring/controllers/AuthController.java

    r743de55 r43c9090  
    33import finki.it.terapijamkbackend.spring.dto.LoginResponse;
    44import finki.it.terapijamkbackend.spring.entities.User;
    5 import finki.it.terapijamkbackend.spring.entities.UserRole;
    65import finki.it.terapijamkbackend.spring.services.UserService;
    76import jakarta.servlet.http.Cookie;
     
    4948            Cookie usernameCookie = new Cookie("username", temp.getUsername());
    5049            usernameCookie.setPath("/");
    51             usernameCookie.setMaxAge(60*5);
     50            usernameCookie.setMaxAge(600);
    5251            response.addCookie(usernameCookie);
     52
     53            Cookie roleCookie = new Cookie("role", temp.getUserRole().toString());
     54            roleCookie.setPath("/");
     55            roleCookie.setMaxAge(600);
     56            response.addCookie(roleCookie);
    5357
    5458            return ResponseEntity.ok(loginResponse);
Note: See TracChangeset for help on using the changeset viewer.