Commit 86a1440b authored by Khalid Ali's avatar Khalid Ali
Browse files

Fixed logout redirect

parent 34f22b25
......@@ -106,7 +106,7 @@ public class BookshareApplication {
@Bean
public SingleSignOutFilter singleSignOutFilter() {
SingleSignOutFilter singleSignOutFilter = new SingleSignOutFilter();
singleSignOutFilter.setCasServerUrlPrefix("https://localhost:9443/");
singleSignOutFilter.setCasServerUrlPrefix("https://localhost:9443");
singleSignOutFilter.setIgnoreInitConfiguration(true);
return singleSignOutFilter;
}
......
......@@ -51,7 +51,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.httpBasic()
.authenticationEntryPoint(authenticationEntryPoint)
.and()
.logout().logoutSuccessUrl("/logout")
.logout().logoutSuccessUrl("/bs/api/logout")
.and()
.addFilterBefore(singleSignOutFilter, CasAuthenticationFilter.class)
.addFilterBefore(logoutFilter, LogoutFilter.class);
......
......@@ -45,7 +45,7 @@ public class BookshareApiController {
this.shareUserService = shareUserService;
}
@GetMapping(value = "/listing/", produces = MediaType.APPLICATION_JSON_VALUE)
@GetMapping(value = "/listing", produces = MediaType.APPLICATION_JSON_VALUE)
public List<ListingDto> getListings() {
List<ListingEntity> listings = listingService.getAll();
return listings.stream()
......@@ -53,7 +53,7 @@ public class BookshareApiController {
.collect(Collectors.toList());
}
@PostMapping(value = "/listing/", consumes = MediaType.APPLICATION_JSON_VALUE)
@PostMapping(value = "/listing", consumes = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(HttpStatus.CREATED)
public ListingDto newListing(@RequestBody ListingDto listingDto) {
ListingEntity post = convertToEntity(listingDto);
......@@ -82,7 +82,7 @@ public class BookshareApiController {
listingService.deleteListing(id);
}
@GetMapping(value = "/listing/{id}/bid/")
@GetMapping(value = "/listing/{id}/bid")
List<BidDto> getBidsAssociatedWithListing(@PathVariable Long id) {
ListingEntity listingEntity = listingService.getById(id);
return listingEntity.getBids().stream()
......@@ -90,7 +90,7 @@ public class BookshareApiController {
.collect(Collectors.toList());
}
@PostMapping(value = "/listing/{id}/bid/")
@PostMapping(value = "/listing/{id}/bid")
@ResponseStatus(HttpStatus.CREATED)
public BidDto addBid(@PathVariable Long id, @RequestBody BidDto bidDto) {
BidEntity bid = convertBidToEntity(bidDto);
......
Markdown is supported
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