| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
openkk
13年前发布

Java的OAuth解析和验证包 joauth

joauth 是 Java 实现用来解析和验证 OAuth 请求的类库。

  • Supports OAuth 1.0a and 2.0
  • Uses thrust.HttpRequest, which can be used to wrap HttpServletRequests or other HTTP Request representations
  • Unpacks Requests, extracts and verifies OAuth parameters from headers, GET, and POST
  • Incidentally parses Non-OAuth GET and POST parameters and makes them accessible via a callback
  • Custom callbacks to obtain scheme and path from the request in a non-standard way
  • Configurable timestamp checking
  • Correctly works around various weird URLEncoder bugs in the JVM
  • Written in Scala, but should work pretty well with Java

示例代码:

import com.推ter.joauth.{Verifier, VerifierResult}    val verify = Verifier()  verify(oAuth1Request, tokenSecret, consumerSecret) match {    case VerifierResult.BAD_NONCE => // handle bad nonce    case VerifierResult.BAD_SIGNATURE => // handle bad signature    case VerifierResult.BAD_TIMESTAMP => // handle bad timestamp    case VerifierResult.OK => //success!  }

项目主页:http://www.open-open.com/lib/view/home/1334108728983

 本文由用户 openkk 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1334108728983.html
Java OAuth开发包