Commit c3cc078f authored by Javi Corvi's avatar Javi Corvi
Browse files

change basic auth path

parent 3ae8d839
Pipeline #25077 passed with stage
in 4 minutes and 45 seconds
......@@ -8,12 +8,14 @@ import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import es.bsc.inb.ades.rest.api.model.Document;
import es.bsc.inb.ades.rest.api.model.DocumentAnnotations;
import es.bsc.inb.ades.rest.api.security.basic.inmemory.AuthenticationBean;
import es.bsc.inb.ades.rest.api.services.DocumentService;
......@@ -24,6 +26,12 @@ public class DocumentController {
@Autowired
public DocumentService documentService;
@GetMapping(path = "/documents/basicauth")
public AuthenticationBean helloWorldBean() {
//throw new RuntimeException("Some Error has Happened! Contact Support at ***-***");
return new AuthenticationBean("You are authenticated");
}
@RequestMapping("/documents/")
public List<Document> findAll() {
return documentService.findAll();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment