File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed
spring-security-oauth-server/src/main/java/org/baeldung/config Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change 7
7
import org .springframework .web .bind .annotation .RequestMapping ;
8
8
import org .springframework .web .bind .annotation .RequestMethod ;
9
9
import org .springframework .web .bind .annotation .ResponseBody ;
10
+ import org .springframework .security .oauth2 .provider .endpoint .FrameworkEndpoint ;
10
11
11
- // @FrameworkEndpoint
12
+ @ FrameworkEndpoint
12
13
public class RevokeTokenEndpoint {
13
14
14
15
@ Resource (name = "tokenServices" )
Original file line number Diff line number Diff line change @@ -26,16 +26,6 @@ public class TokenController {
26
26
@ Resource (name = "tokenStore" )
27
27
TokenStore tokenStore ;
28
28
29
- @ RequestMapping (method = RequestMethod .DELETE , value = "/oauth/token" )
30
- @ ResponseBody
31
- public void revokeToken (HttpServletRequest request ) {
32
- String authorization = request .getHeader ("Authorization" );
33
- if (authorization != null && authorization .contains ("Bearer" )) {
34
- String tokenId = authorization .substring ("Bearer" .length () + 1 );
35
- tokenServices .revokeToken (tokenId );
36
- }
37
- }
38
-
39
29
@ RequestMapping (method = RequestMethod .POST , value = "/oauth/token/revokeById/{tokenId}" )
40
30
@ ResponseBody
41
31
public void revokeToken (HttpServletRequest request , @ PathVariable String tokenId ) {
You can’t perform that action at this time.
0 commit comments