Skip to main content

Negotiate authentication for the requests HTTP client library

Project description

# requests-negotiate

An implementation of HTTP Negotiate authentication ([RFC 4559](http://tools.ietf.org/html/rfc4559)) for [requests](http://docs.python-requests.org/en/latest/).

Negotiate authentication is commonly used to provide Kerberos authentication through GSSAPI.

## Usage

Here’s a trivial example:

import requests import requests_negotiate

auth = requests_negotiate.HTTPNegotiateAuth() response = requests.get(’https://example.org/’, auth=auth)

You’ll need a valid Kerberos ticket - acquired using e.g. kinit - for this to work.

### Options

You can instantiate an HTTPNegotiateAuth with the following optional parameters:

  • service - A Kerberos principal is generally composed of a service name (e.g. ‘HTTP’) and a hostname, separated by a slash (‘/’). This lets you override the default service of 'HTTP'.

  • service_name - Overrides the full service name (e.g. 'HTTP/example.org')

  • negotiate_client_name - Explicitly specify which client principal to authenticate as. Particularly useful when you’re using a credential cache collection.

  • preempt - Attempt Negotiate authentication before it is offered.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

requests-negotiate-1.4.tar.gz (2.7 kB view details)

Uploaded Source

File details

Details for the file requests-negotiate-1.4.tar.gz.

File metadata

File hashes

Hashes for requests-negotiate-1.4.tar.gz
Algorithm Hash digest
SHA256 68ad719a6291b4be61811ff56f76c8f1e0cb3a05a7e6033e9495cd24a3fbf99c
MD5 2e766fc900d0626bcb5857bfa5cb1331
BLAKE2b-256 3811e4ecda1c4ee655ebd7fd161278e836004a059a2477c60ed1835dfd9a168c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page