|
@@ -1,5 +1,5 @@
|
|
/*
|
|
/*
|
|
- * Copyright 2002-2018 the original author or authors.
|
|
|
|
|
|
+ * Copyright 2002-2021 the original author or authors.
|
|
*
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* you may not use this file except in compliance with the License.
|
|
@@ -70,6 +70,9 @@ public class OAuth2ErrorResponseErrorHandler implements ResponseErrorHandler {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
BearerTokenError bearerTokenError = getBearerToken(wwwAuthenticateHeader);
|
|
BearerTokenError bearerTokenError = getBearerToken(wwwAuthenticateHeader);
|
|
|
|
+ if (bearerTokenError == null) {
|
|
|
|
+ return new OAuth2Error(OAuth2ErrorCodes.SERVER_ERROR, null, null);
|
|
|
|
+ }
|
|
String errorCode = (bearerTokenError.getCode() != null) ? bearerTokenError.getCode()
|
|
String errorCode = (bearerTokenError.getCode() != null) ? bearerTokenError.getCode()
|
|
: OAuth2ErrorCodes.SERVER_ERROR;
|
|
: OAuth2ErrorCodes.SERVER_ERROR;
|
|
String errorDescription = bearerTokenError.getDescription();
|
|
String errorDescription = bearerTokenError.getDescription();
|