logout is not working on spring security oauth2
up vote
0
down vote
favorite
i am using authorization code flow of aouth2 with spring boot.
my controller code is :
@Controller
public class LogoutController
@RequestMapping("/exit")
public void exit(HttpServletRequest request, HttpServletResponse response)
// token can be revoked here if needed
new SecurityContextLogoutHandler().logout(request, null, null);
try
//sending back to client app
response.sendRedirect(request.getHeader("referer"));
catch (IOException e)
e.printStackTrace();
i have to use this with angular 6.logout is not working,i don't know whether it's because of authorization code,how to expire authorization code?or JSESSIONID not invalidate.how to do so ?
aouth serve configuration
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception
clients
.inMemory()
.withClient("cat")
.secret("cat456")
.authorizedGrantTypes("authorization_code","refresh_token")
.scopes("user_info")
.autoApprove(true);
angular spring-boot spring-security-oauth2
add a comment |
up vote
0
down vote
favorite
i am using authorization code flow of aouth2 with spring boot.
my controller code is :
@Controller
public class LogoutController
@RequestMapping("/exit")
public void exit(HttpServletRequest request, HttpServletResponse response)
// token can be revoked here if needed
new SecurityContextLogoutHandler().logout(request, null, null);
try
//sending back to client app
response.sendRedirect(request.getHeader("referer"));
catch (IOException e)
e.printStackTrace();
i have to use this with angular 6.logout is not working,i don't know whether it's because of authorization code,how to expire authorization code?or JSESSIONID not invalidate.how to do so ?
aouth serve configuration
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception
clients
.inMemory()
.withClient("cat")
.secret("cat456")
.authorizedGrantTypes("authorization_code","refresh_token")
.scopes("user_info")
.autoApprove(true);
angular spring-boot spring-security-oauth2
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
i am using authorization code flow of aouth2 with spring boot.
my controller code is :
@Controller
public class LogoutController
@RequestMapping("/exit")
public void exit(HttpServletRequest request, HttpServletResponse response)
// token can be revoked here if needed
new SecurityContextLogoutHandler().logout(request, null, null);
try
//sending back to client app
response.sendRedirect(request.getHeader("referer"));
catch (IOException e)
e.printStackTrace();
i have to use this with angular 6.logout is not working,i don't know whether it's because of authorization code,how to expire authorization code?or JSESSIONID not invalidate.how to do so ?
aouth serve configuration
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception
clients
.inMemory()
.withClient("cat")
.secret("cat456")
.authorizedGrantTypes("authorization_code","refresh_token")
.scopes("user_info")
.autoApprove(true);
angular spring-boot spring-security-oauth2
i am using authorization code flow of aouth2 with spring boot.
my controller code is :
@Controller
public class LogoutController
@RequestMapping("/exit")
public void exit(HttpServletRequest request, HttpServletResponse response)
// token can be revoked here if needed
new SecurityContextLogoutHandler().logout(request, null, null);
try
//sending back to client app
response.sendRedirect(request.getHeader("referer"));
catch (IOException e)
e.printStackTrace();
i have to use this with angular 6.logout is not working,i don't know whether it's because of authorization code,how to expire authorization code?or JSESSIONID not invalidate.how to do so ?
aouth serve configuration
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception
clients
.inMemory()
.withClient("cat")
.secret("cat456")
.authorizedGrantTypes("authorization_code","refresh_token")
.scopes("user_info")
.autoApprove(true);
angular spring-boot spring-security-oauth2
angular spring-boot spring-security-oauth2
edited Nov 9 at 8:52
Thiru
1,179718
1,179718
asked Nov 9 at 6:53
A. perera
44
44
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53221091%2flogout-is-not-working-on-spring-security-oauth2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown