• 大小: 67KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-13
  • 语言: Java
  • 标签: OAuth2验证  

资源简介

微信企业号OAuth2验证接口的2种实例(使用SpringMVC),里面包含注解方式和简单实现OAuth2的验证,此例不包含jar,因为jar太大而且之前的例子已经上传过了!

资源截图

代码片段和文件信息

package org.oms.qiye.aes;

@SuppressWarnings(“serial“)
public class AesException extends Exception {

public final static int OK = 0;
public final static int ValidateSignatureError = -40001;
public final static int ParsexmlError = -40002;
public final static int ComputeSignatureError = -40003;
public final static int IllegalAesKey = -40004;
public final static int ValidateCorpidError = -40005;
public final static int EncryptAESError = -40006;
public final static int DecryptAESError = -40007;
public final static int IllegalBuffer = -40008;
//public final static int Encodebase64Error = -40009;
//public final static int Decodebase64Error = -40010;
//public final static int GenReturnxmlError = -40011;

private int code;

private static String getMessage(int code) {
switch (code) {
case ValidateSignatureError:
return “签名验证错误“;
case ParsexmlError:
return “xml解析失败“;
case ComputeSignatureError:
return “sha加密生成签名失败“;
case IllegalAesKey:
return “SymmetricKey非法“;
case ValidateCorpidError:
return “corpid校验失败“;
case EncryptAESError:
return “aes加密失败“;
case DecryptAESError:
return “aes解密失败“;
case IllegalBuffer:
return “解密后得到的buffer非法“;
// case Encodebase64Error:
// return “base64加密错误“;
// case Decodebase64Error:
// return “base64解密错误“;
// case GenReturnxmlError:
// return “xml生成失败“;
default:
return null; // cannot be
}
}

public int getCode() {
return code;
}

AesException(int code) {
super(getMessage(code));
this.code = code;
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        919  2014-09-19 13:01  QiyeProject\.classpath

     文件       1044  2014-09-19 12:54  QiyeProject\.project

     文件        503  2014-09-19 12:54  QiyeProject\.settings\.jsdtscope

     文件        364  2014-09-19 12:54  QiyeProject\.settings\org.eclipse.jdt.core.prefs

     文件        485  2014-09-19 12:54  QiyeProject\.settings\org.eclipse.wst.common.component

     文件        345  2014-09-19 12:54  QiyeProject\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2014-09-19 12:54  QiyeProject\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2014-09-19 12:54  QiyeProject\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       1271  2014-11-03 16:15  QiyeProject\build\classes\org\oms\qiye\aes\AesException.class

     文件       1135  2014-11-03 16:15  QiyeProject\build\classes\org\oms\qiye\aes\ByteGroup.class

     文件       1535  2014-11-03 16:15  QiyeProject\build\classes\org\oms\qiye\aes\PKCS7Encoder.class

     文件       1865  2014-11-03 16:15  QiyeProject\build\classes\org\oms\qiye\aes\SHA1.class

     文件       6234  2014-11-03 16:15  QiyeProject\build\classes\org\oms\qiye\aes\WXBizMsgCrypt.class

     文件       2607  2014-11-03 16:15  QiyeProject\build\classes\org\oms\qiye\aes\xmlParse.class

     文件       1013  2014-10-08 19:07  QiyeProject\build\classes\org\oms\qiye\enums\EnumMethod.class

     文件       3678  2014-10-08 20:15  QiyeProject\build\classes\org\oms\qiye\interceptor\OAuth2Interceptor.class

     文件        404  2014-10-09 10:46  QiyeProject\build\classes\org\oms\qiye\interceptor\OAuthRequired.class

     文件        761  2014-10-08 19:09  QiyeProject\build\classes\org\oms\qiye\pojo\AccessToken.class

     文件       1152  2014-10-08 19:04  QiyeProject\build\classes\org\oms\qiye\pojo\resp\Article.class

     文件       1459  2014-10-08 19:04  QiyeProject\build\classes\org\oms\qiye\pojo\resp\baseMessage.class

     文件       1182  2014-10-08 19:04  QiyeProject\build\classes\org\oms\qiye\pojo\resp\Music.class

     文件        622  2014-10-08 19:04  QiyeProject\build\classes\org\oms\qiye\pojo\resp\MusicMessage.class

     文件       1070  2014-10-08 19:04  QiyeProject\build\classes\org\oms\qiye\pojo\resp\NewsMessage.class

     文件        591  2014-10-08 19:04  QiyeProject\build\classes\org\oms\qiye\pojo\resp\TextMessage.class

     文件       3109  2014-11-03 21:08  QiyeProject\build\classes\org\oms\qiye\service\CoreService.class

     文件        624  2014-11-03 16:19  QiyeProject\build\classes\org\oms\qiye\util\Constants.class

     文件       5341  2014-10-08 19:07  QiyeProject\build\classes\org\oms\qiye\util\HttpRequestUtil.class

     文件       1394  2014-10-08 19:04  QiyeProject\build\classes\org\oms\qiye\util\MessageUtil$1$1.class

     文件        724  2014-10-08 19:04  QiyeProject\build\classes\org\oms\qiye\util\MessageUtil$1.class

     文件       3795  2014-10-08 19:04  QiyeProject\build\classes\org\oms\qiye\util\MessageUtil.class

............此处省略78个文件信息

评论

共有 条评论

相关资源