File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
src/main/java/com/jaspersoft/jasperserver/jaxrs/client Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,6 @@ protected void login(SessionStorage storage) {
6060 AuthenticationCredentials credentials = storage .getCredentials ();
6161 WebTarget rootTarget = storage .getRootTarget ();
6262 if (configuration .getAuthenticationType () == AuthenticationType .BASIC ) {
63- //TODO registeer ehcoding filter
6463 rootTarget .register (new BasicAuthenticationFilter (credentials ));
6564 return ;
6665 }
Original file line number Diff line number Diff line change @@ -23,6 +23,9 @@ public BasicAuthenticationFilter(AuthenticationCredentials credentials) {
2323 @ Override
2424 public void filter (ClientRequestContext clientRequestContext ) throws IOException {
2525 MultivaluedMap <String , Object > headers = clientRequestContext .getHeaders ();
26+ if (credentials .getUsername () == null && credentials .getPassword () == null ) {
27+ return ;
28+ }
2629 final String basicAuthentication = getBasicAuthentication ();
2730 headers .add ("Authorization" , basicAuthentication );
2831
You can’t perform that action at this time.
0 commit comments