Kenmegne
7 days ago 1bc8864f134272c4bf23a9b05831803a423a4771
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.megatim.apifdxweb.service.ifaces.authentication;
 
import com.megatim.apifdxweb.model.dtos.EditPasswordDto;
import com.megatim.apifdxweb.model.dtos.TokenAuthentificationRequest;
import javax.annotation.security.PermitAll;
import javax.validation.Valid;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
 
/**
 *
 * @author Gabuntu
 */
public interface AuthenticationRS {
 
    @POST
    @Consumes({MediaType.APPLICATION_JSON})
    @Produces({MediaType.APPLICATION_JSON})
    @Path("generate-token")
    public Response authenticate(@Valid TokenAuthentificationRequest authentificationRequest);
    
     @POST
    @Consumes({MediaType.APPLICATION_JSON})
    @Produces({MediaType.APPLICATION_JSON})
    @Path("edit-password")
    @PermitAll
    public Response editPassword(@Context HttpHeaders headers, @Valid EditPasswordDto editPasswordDto);
}