111
hxb
2022-11-24 0a3e07f10937484145f33c7560607b4b2353cb81
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package com.mm.android.deviceaddmodule.mobilecommon.utils;
 
import com.mm.android.deviceaddmodule.mobilecommon.businesstip.SMBErrorCode;
 
public class BusinessAuthUtil {
 
    //被踢出的相关错误码
    private static int [] errorCodesInt = new int[]{SMBErrorCode.REQUEST_AUTHORITY_ERROR, SMBErrorCode.REQUEST_INVALID_TOKEN, SMBErrorCode.REQUEST_LOGIN_EXPIRED, SMBErrorCode.REQUEST_SIGNATURE_FORMAT_ERROR};//客户端转换,两组 对应
 
    public static boolean isAuthFailed(int codeFromHandle) {
        for (int errorCode : errorCodesInt){
            if( codeFromHandle == errorCode){
                return true;
            }
        }
        return false;
    }
}