https://github.com/ruby/net-http-sspi
net-http bindings for Win32 SSPI functions
https://github.com/ruby/net-http-sspi
ruby
Last synced: 9 months ago
JSON representation
net-http bindings for Win32 SSPI functions
- Host: GitHub
- URL: https://github.com/ruby/net-http-sspi
- Owner: ruby
- License: other
- Created: 2024-10-07T02:43:16.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-25T06:44:11.000Z (over 1 year ago)
- Last Synced: 2025-09-24T04:37:41.037Z (9 months ago)
- Topics: ruby
- Language: Ruby
- Homepage:
- Size: 41 KB
- Stars: 2
- Watchers: 29
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# Net::HTTP::SSPI
net-http-sspi implements bindings to Win32 SSPI functions, focused on
authentication to a proxy server over HTTP.
## Installation
net-http-sspi is a bundled gem of the ruby standard library, so that the
latest version on the ruby release date is preinstalled on Windows.
Other versions of the gem can be installed in addition like so:
Install the gem and add to the application's Gemfile by executing:
$ bundle add net-http-sspi
If bundler is not being used to manage dependencies, install the gem
by executing:
$ gem install net-http-sspi
## Usage
```ruby
require "net/http"
proxy_arguments = [proxy_server,] # ...
http = Net::HTTP.new(hostname, nil, *proxy_arguments)
http.instance_variable_set(:@sspi_enabled, true)
req = Net::HTTP::Get.new('/todos/1')
http.request(req)
```
See [Proxy Server in Net::HTTP] for proxy arguments.
[Proxy Server in Net::HTTP]: https://docs.ruby-lang.org/en/master/Net/HTTP.html#class-Net::HTTP-label-Proxy+Server
## Development
To install this gem onto your local machine, run `bundle exec rake
install`. To release a new version, update the version number in
`version.rb`, and then run `bundle exec rake release`, which will
create a git tag for the version, push git commits and the created
tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on [GitHub].
[GitHub]: https://github.com/ruby/net-http-sspi