zhouhao преди 7 години
родител
ревизия
cae41cc0aa

+ 4 - 0
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-auth-server/src/main/java/org/hswebframework/web/authorization/oauth2/server/support/HttpTokenRequest.java

@@ -82,6 +82,10 @@ public class HttpTokenRequest implements TokenRequest {
         }
         if (authorization != null && !authorization.isEmpty()) {
             String[] decodeCredentials = decodeClientAuthenticationHeader(authorization);
+            //fix #63
+            if (decodeCredentials == null) {
+                return null;
+            }
             if (decodeCredentials.length > 1) {
                 principal = decodeCredentials[0];
                 credentials = decodeCredentials[1];