OAuth 1.0a 和适用于 Java 的 Google OAuth 客户端库
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
OAuth 1.0 是一项标准规范,可让最终用户安全地授权客户端应用访问受保护的服务器端资源。
重要通告
Java 版 Google OAuth 客户端库提供的 OAuth 1.0a 支持为 @Beta 版。
请勿使用 OAuth 1.0 访问 Google API,因为 Google 已弃用 OAuth 1.0,取而代之的是 OAuth 2.0。如果您当前有应用使用 OAuth 1.0 访问 Google API,请参阅从 OAuth 1.0 迁移到 OAuth 2.0。
使用 OAuth 1.0
Java 版 Google OAuth 客户端库支持 OAuth 1.0a (@Beta) 的两种签名方法,我们提供这两种方法用于非 Google 服务:
如需了解详情,请参阅 OAuth 1.0 软件包的 Javadoc。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eOAuth 1.0 is a standard for secure authorization of client applications to access protected server resources.\u003c/p\u003e\n"],["\u003cp\u003eGoogle's OAuth Client Library for Java provides beta support for OAuth 1.0a, but it's not for use with Google APIs.\u003c/p\u003e\n"],["\u003cp\u003eGoogle has deprecated OAuth 1.0 for its APIs, recommending migration to OAuth 2.0 instead.\u003c/p\u003e\n"],["\u003cp\u003eThe library supports HMAC-SHA1 and RSA-SHA1 signature methods for OAuth 1.0a for non-Google services.\u003c/p\u003e\n"]]],[],null,["# OAuth 1.0a and the Google OAuth Client Library for Java\n\n[OAuth 1.0](http://tools.ietf.org/html/rfc5849) is a standard specification for\nallowing end users to securely authorize a client application to access protected\nserver-side resources.\n\nImportant notices\n-----------------\n\nThe OAuth 1.0a support provided by the Google OAuth Client Library for Java is\n[@Beta](/api-client-library/java/google-oauth-java-client#beta).\n\nDo not use OAuth 1.0 to access\nGoogle APIs, because Google has deprecated its support for OAuth 1.0 in favor\nof OAuth 2.0. If you currently have an app that accesses Google APIs using\nOAuth 1.0, see\n[Migrating from OAuth 1.0 to OAuth 2.0](https://developers.google.com/accounts/docs/OAuth_ref#migration).\n\nUsing OAuth 1.0\n---------------\n\nThe Google OAuth Client Library for Java supports two types of signature methods\nfor OAuth 1.0a ([@Beta](/api-client-library/java/google-oauth-java-client#beta)), which we provide for\nuse with non-Google services:\n\n- HMAC-SHA1 ([OAuthHmacSigner](https://developers.google.com/api-client-library/java/google-oauth-java-client/reference/1.20.0/com/google/api/client/auth/oauth/OAuthHmacSigner.html))\n- RSA-SHA1 ([OAuthRsaSigner](https://developers.google.com/api-client-library/java/google-oauth-java-client/reference/1.20.0/com/google/api/client/auth/oauth/OAuthRsaSigner.html))\n\nFor details, see the\n[Javadoc for the OAuth 1.0 package](https://developers.google.com/api-client-library/java/google-oauth-java-client/reference/1.20.0/com/google/api/client/auth/oauth/package-summary.html)."]]