boolean bearerAuthorization = (cred != null && cred instanceof BearerCredentials);
                     boolean samlBasedSsoAuthorization = (cred == null && ssoSessionCookie != null);
                     if (bearerAuthorization) {
                     boolean bearerAuthorization = (cred != null && cred instanceof BearerCredentials);
                     boolean samlBasedSsoAuthorization = (cred == null && ssoSessionCookie != null);
                     if (bearerAuthorization) {