略~~~_个人页

个人头像照片 略~~~
0
4
0

个人介绍

暂无个人介绍

擅长的技术

  • Linux
获得更多能力
通用技术能力:

暂时未有相关通用技术能力~

云产品技术能力:

暂时未有相关云产品技术能力~

阿里云技能认证

详细说明
  • 提交了问题 2016-02-25

    java免登陆

  • 提交了问题 2016-02-16

    获取部门信息失败:errcode40014errmsg不合法的accesstoken

暂无更多信息
正在加载, 请稍后...
暂无更多信息
  • 回答了问题 2016-04-01

    获取部门信息失败:errcode40014errmsg不合法的accesstoken

    回 1楼君信的帖子 有什么不同能具体介绍下吗?观点文档介绍也行
    踩0 评论0
  • 提交了问题 2016-02-25

    java免登陆

  • 提交了问题 2016-02-16

    获取部门信息失败:errcode40014errmsg不合法的accesstoken

  • 回答了问题 2016-02-15

    suiteaccesstoken报错

    Resuiteaccesstoken报错 这个问题是怎么解决的?? ------------------------- 回 3楼竹梅的帖子 httpclient-4.4报错同样的错 ------------------------- Resuiteaccesstoken报错 原因分析:httpclient对https进行服务器证书ssl校验,某些情况下,URI制定一个ip而不是主机,这种情况下subjectataltname证书必须存在完全匹配URI的ip。从本质上讲该服务的证书不符合HTTPS规范,应联系改服务器建立证书与ip对应的设置。 解决办法(不推荐): //创建TrustManager         X509TrustManager xtm = new X509TrustManager() {             public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {}             public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {}             public X509Certificate[] getAcceptedIssuers() {                 return null;             }         };         //HOST验证         X509HostnameVerifier hostnameVerifier = new X509HostnameVerifier() {             public boolean verify(String arg0, SSLSession arg1) {                 return true;             }             public void verify(String arg0, SSLSocket arg1) throws IOException {}             public void verify(String arg0, String[] arg1, String[] arg2) throws SSLException {}             public void verify(String arg0, X509Certificate arg1) throws SSLException {}         };          try {         HttpClient    httpClient=new DefaultHttpClient(); SSLContext ctx = SSLContext.getInstance('TLS');          //使用TrustManager来初始化该上下文,TrustManager只是被SSL的Socket所使用          ctx.init(null, new TrustManager[] { xtm }, null);          //创建SSLSocketFactory          SSLSocketFactory socketFactory = new SSLSocketFactory(ctx);          socketFactory.setHostnameVerifier(hostnameVerifier);          SSLSocketFactory.getSocketFactory().setHostnameVerifier(hostnameVerifier);          httpClient.getConnectionManager().getSchemeRegistry().register(new Scheme('https', socketFactory, 443)); //钉钉获取token           URI url = new URI('https://oapi.dingtalk.com/sso/gettoken?corpid=dingedXXXXXXXX&corpsecret=XXXXXXXXX');           HttpGet get = new HttpGet(url);           HttpResponse response = httpClient.execute(get);           HttpEntity entity=response.getEntity();           if(entity!= null){               JSONObject jsonObject=JSONObject.parseObject(EntityUtils.toString(entity));               System.out.print(jsonObject.get('access_token')  );           } } catch (Exception e) { e.printStackTrace(); } ------------------------- 回 7楼略的帖子 导入的包 import java.security.KeyManagementException; import java.security.NoSuchAlgorithmException; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLException; import javax.net.ssl.SSLSession; import javax.net.ssl.SSLSocket; import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.ParseException; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpClient; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpPost; import org.apache.http.conn.scheme.Scheme; import org.apache.http.conn.ssl.SSLSocketFactory; import org.apache.http.conn.ssl.X509HostnameVerifier; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import org.apache.http.util.EntityUtils;
    踩0 评论0
正在加载, 请稍后...
滑动查看更多
正在加载, 请稍后...
暂无更多信息