Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Khalid Ali
bookshare-backend
Commits
86a1440b
Commit
86a1440b
authored
Jan 12, 2019
by
Khalid Ali
Browse files
Fixed logout redirect
parent
34f22b25
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/gmu/bookshare/BookshareApplication.java
View file @
86a1440b
...
...
@@ -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
;
}
...
...
src/main/java/com/gmu/bookshare/config/SecurityConfig.java
View file @
86a1440b
...
...
@@ -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
);
...
...
src/main/java/com/gmu/bookshare/web/BookshareApiController.java
View file @
86a1440b
...
...
@@ -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
);
...
...
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