mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-07 01:18:27 +08:00
优化代码,去掉已过时代码
This commit is contained in:
parent
cfe913abdb
commit
6e40596088
@ -17,6 +17,7 @@
|
|||||||
package org.dromara.maxkey.authz.oauth2.provider.endpoint;
|
package org.dromara.maxkey.authz.oauth2.provider.endpoint;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -231,7 +232,7 @@ public class TokenEndpointAuthenticationFilter implements Filter {
|
|||||||
public Authentication ClientCredentials(HttpServletRequest request, HttpServletResponse response)
|
public Authentication ClientCredentials(HttpServletRequest request, HttpServletResponse response)
|
||||||
throws AuthenticationException, IOException, ServletException {
|
throws AuthenticationException, IOException, ServletException {
|
||||||
if (allowOnlyPost && !"POST".equalsIgnoreCase(request.getMethod())) {
|
if (allowOnlyPost && !"POST".equalsIgnoreCase(request.getMethod())) {
|
||||||
throw new HttpRequestMethodNotSupportedException(request.getMethod(), new String[] { "POST","G" });
|
throw new HttpRequestMethodNotSupportedException(request.getMethod(), Arrays.asList("POST","G"));
|
||||||
}
|
}
|
||||||
|
|
||||||
String clientId = request.getParameter(OAuth2Constants.PARAMETER.CLIENT_ID);
|
String clientId = request.getParameter(OAuth2Constants.PARAMETER.CLIENT_ID);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user