File tree Expand file tree Collapse file tree
claimManagement/src/main/java/org/openimis/imisclaims/network/okhttp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ public class AuthorizationInterceptor implements Interceptor {
2323 public AuthorizationInterceptor (@ NonNull Global global ) {
2424 this .global = global ;
2525 }
26- private static final String REQUESTED_WITH = "mobile_app" ;
26+ private static final String USER_AGENT = "mobile_app" ;
2727
2828 @ NonNull
2929 @ Override
@@ -33,11 +33,7 @@ public Response intercept(@NonNull Chain chain) throws IOException {
3333 if (token != null && token .isTokenValidJWT ()) {
3434 Request .Builder builder = chain .request ().newBuilder ();
3535 builder .addHeader ("Authorization" , "bearer " + token .getTokenText ().trim ());
36- if (csrfToken != null ){
37- Log .e ("csrf token" , csrfToken );
38- builder .addHeader ("X-Csrftoken" , csrfToken );
39- builder .addHeader ("X-Requested-With" , REQUESTED_WITH );
40- }
36+ builder .addHeader ("User-Agent" , USER_AGENT );
4137 Response response = chain .proceed (builder .build ());
4238 if (response .code () == HttpURLConnection .HTTP_UNAUTHORIZED ) {
4339 global .getJWTToken ().clearToken ();
You can’t perform that action at this time.
0 commit comments