Ignore:
Timestamp:
09/11/22 18:03:58 (22 months ago)
Author:
Marko <Marko@…>
Branches:
master
Children:
775e15e
Parents:
527b93f
Message:

Prototype version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • phonelux-backend/src/main/java/finki/it/phoneluxbackend/security/CustomAuthenticationFilter.java

    r527b93f re5b84dc  
    3333    @Override
    3434    public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException {
    35         String email = request.getParameter("email"); // mozda ke treba da se smeni vo username
     35        String email = request.getParameter("email");
    3636        String password = request.getParameter("password");
    3737        UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(email,password);
     
    4646        String access_token = JWT.create()
    4747                .withSubject(user.getEmail())
    48                 .withExpiresAt(new Date(System.currentTimeMillis() + 10 * 60 * 1000))
     48                .withExpiresAt(new Date(System.currentTimeMillis() + 10 * 60 * 100000)) // approx. 16.5 hours
    4949                .withIssuer(request.getRequestURL().toString())
    5050                .withClaim("role", user.getAuthorities().stream()
Note: See TracChangeset for help on using the changeset viewer.