Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
INB
eTRANSAFE
pretox-rest-api
Commits
564a575c
Commit
564a575c
authored
Oct 11, 2021
by
Javi Corvi
Browse files
change basic auth path
parent
106b7e59
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/es/bsc/inb/ades/rest/api/controllers/DocumentController.java
View file @
564a575c
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment