Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`web`.`iweb`.`ICredentialFactory``

interface documentation

`class ICredentialFactory(Interface): (source)`

Known implementations: `twisted.web.guard.BasicCredentialFactory`, `twisted.web.guard.DigestCredentialFactory`

View In Hierarchy

A credential factory defines a way to generate a particular kind of authentication challenge and a way to interpret the responses to these challenges. It creates `ICredentials` providers from responses. These objects will be used with `twisted.cred` to authenticate an authorize requests.

Method | `decode` | Create a credentials object from the given response.
Method | `getChallenge` | Generate a new challenge to be sent to a client.
Attribute | `scheme` | A `str` giving the name of the authentication scheme with which this factory is associated. For example, `'basic'` or `'digest'`.

def decode(response, request): (source)

Create a credentials object from the given response.

Parameters
response:`str` | scheme specific response string
request:`twisted.web.http.Request` | The request being processed (from which the response was taken).
Returns
`twisted.cred.credentials.ICredentials` provider | The credentials represented by the given response.
Raises
`twisted.cred.error.LoginFailed` | If the response is invalid.

def getChallenge(request): (source)

Generate a new challenge to be sent to a client.

Parameters
request:`twisted.web.http.Request` | The request the response to which this challenge will be included.
Returns
`dict` | A mapping from `str` challenge fields to associated `str` values.

scheme = (source)

A `str` giving the name of the authentication scheme with which this factory is associated. For example, `'basic'` or `'digest'`.