• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

googleapis/google-auth-library-swift: Auth client library for Swift command-line ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

googleapis/google-auth-library-swift

开源软件地址(OpenSource Url):

https://github.com/googleapis/google-auth-library-swift

开源编程语言(OpenSource Language):

Swift 92.1%

开源软件介绍(OpenSource Introduction):

Swift Actions Status

Auth Library for Swift

This project contains Swift packages that can be used to write command-line tools and cloud services that use OAuth to authenticate and authorize access to remote services.

Currently these packages support OAuth1 and OAuth2. They are designed to work on macOS systems and on Linux systems that are running in the Google Cloud.

  • On macOS systems, OAuth tokens can be obtained using the locally-installed browser and a local web server that is automatically run in the command-line client.

  • On Linux systems, OAuth tokens can be obtained automatically from the Google Cloud Metadata Service.

  • On both Linux and macOS systems, OAuth tokens can be obtained automatically for Google Cloud Service Accounts.

Usage and Examples

Sources/Examples contains examples that illustrate OAuth1 and OAuth2 signin for various services. Each requires valid application credentials to run. See the various service providers for details.

The BrowserTokenProvider classes use a local web server to implement "three-legged OAuth" signin in which users grant permission in a browser that a provider's server redirects to the client server with a code. These providers look for OAuth configuration information in "credentials" YAML files that are expected to be in $HOME/.credentials. Sample credentials files are in credentials and include client IDs, client secrets, and OAuth service URLs. When OAuth services require registered callback URLs, these should be set to http://localhost:8080/SERVICE/callback where SERVICE is specified in the corresponding credentials YAML file. The temporary web server runs locally on port 8080.

Credits

  • The local web server is built using swift-nio/http.
  • HMAC and SHA1 hashing is performed using CryptoSwift.
  • RSA signing of service account JWT tokens uses BigInt.

Disclaimer

This is work in progress toward great server-side Swift software. Please take care when using this in production projects: always refer to a tagged version and be aware that interfaces may change in future releases.

Contributing

We'd love to collaborate on this. See CONTRIBUTING.md for details.

Copyright

Copyright 2019, Google LLC.

License

Released under the Apache 2.0 license.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
ericlbarnes/CodeIgniter-Slug-Library: Generate friendly uri strings发布时间:2022-08-15
下一篇:
nasa/PrognosticsModelLibrary发布时间:2022-08-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap