Examples of ErrorObject


Examples of cn.jpush.api.common.ResponseResult.ErrorObject

        }
        return null;
    }
   
  public int getErrorCode() {
      ErrorObject eo = getErrorObject();
      if (null != eo) {
          return eo.code;
      }
      return ERROR_CODE_OK;
  }
View Full Code Here

Examples of cn.jpush.api.common.ResponseResult.ErrorObject

      }
      return ERROR_CODE_OK;
  }
 
  public String getErrorMessage() {
      ErrorObject eo = getErrorObject();
      if (null != eo) {
          return eo.message;
      }
      return ERROR_MESSAGE_NONE;
  }
View Full Code Here

Examples of cn.jpush.api.common.ResponseWrapper.ErrorObject

    public int getStatus() {
        return this.responseWrapper.responseCode;
    }
   
    public long getMsgId() {
        ErrorObject eo = getErrorObject();
        if (null != eo) {
            return eo.msg_id;
        }
        return 0;
    }
View Full Code Here

Examples of cn.jpush.api.common.ResponseWrapper.ErrorObject

        }
        return 0;
    }
   
    public int getErrorCode() {
        ErrorObject eo = getErrorObject();
        if (null != eo) {
            return eo.error.code;
        }
        return -1;
    }
View Full Code Here

Examples of cn.jpush.api.common.ResponseWrapper.ErrorObject

        }
        return -1;
    }
   
    public String getErrorMessage() {
        ErrorObject eo = getErrorObject();
        if (null != eo) {
            return eo.error.message;
        }
        return null;
    }
View Full Code Here

Examples of cn.jpush.api.common.ResponseWrapper.ErrorObject

        }
        return null;
    }
   
    public int getErrorCode() {
        ErrorObject eo = getErrorObject();
        if (null != eo) {
            return eo.error.code;
        }
        if (null != responseWrapper) {
            if (responseWrapper.responseCode == RESPONSE_OK) {
View Full Code Here

Examples of cn.jpush.api.common.ResponseWrapper.ErrorObject

        }
        return ERROR_CODE_NONE;
    }
   
    public String getErrorMessage() {
        ErrorObject eo = getErrorObject();
        if (null != eo) {
            return eo.error.message;
        }
        return ERROR_MESSAGE_NONE;
    }
View Full Code Here

Examples of com.nimbusds.oauth2.sdk.ErrorObject

  public static ClientRegistrationErrorResponse parse(final HTTPResponse httpResponse)
    throws ParseException {
   
    httpResponse.ensureStatusCodeNotOK();

    ErrorObject error;

    String wwwAuth = httpResponse.getWWWAuthenticate();
   
    if (StringUtils.isNotBlank(wwwAuth)) {

      error = BearerTokenError.parse(wwwAuth);

    } else {
     
      String code = null;
      String description = null;
     
      if (CommonContentTypes.APPLICATION_JSON.match(httpResponse.getContentType())) {
       
        JSONObject jsonObject = httpResponse.getContentAsJSONObject();

        code = JSONObjectUtils.getString(jsonObject, "error");

        if (jsonObject.containsKey("error_description"))
          description = JSONObjectUtils.getString(jsonObject, "error_description");
      }
     
      error = new ErrorObject(code, description, httpResponse.getStatusCode());
    }

    return new ClientRegistrationErrorResponse(error);
  }
View Full Code Here

Examples of com.nimbusds.oauth2.sdk.ErrorObject

  public void testCodeErrorResponse()
    throws Exception {

    URI redirectURI = new URI("https://client.com/cb");
    ErrorObject error = OAuth2Error.ACCESS_DENIED;
    ResponseType responseType = new ResponseType("code");
    State state = new State("123");

    AuthenticationErrorResponse response = new AuthenticationErrorResponse(
      redirectURI, error, responseType, state);
View Full Code Here

Examples of com.nimbusds.oauth2.sdk.ErrorObject

  public void testIDTokenErrorResponse()
    throws Exception {

    URI redirectURI = new URI("https://client.com/cb");
    ErrorObject error = OAuth2Error.ACCESS_DENIED;
    ResponseType responseType = new ResponseType("id_token");
    State state = new State("123");

    AuthenticationErrorResponse response = new AuthenticationErrorResponse(
      redirectURI, error, responseType, state);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.