Skip to content

archivebox.api.auth

Nick Sweeting edited this page Nov 13, 2024 · 2 revisions

{py:mod}archivebox.api.auth

:allowtitles:

Module Contents

Classes

:class: autosummary longtable
:align: left

* - {py:obj}`APITokenAuthCheck <archivebox.api.auth.APITokenAuthCheck>`
  - ```{autodoc2-docstring} archivebox.api.auth.APITokenAuthCheck
    :summary:
    ```
* - {py:obj}`UserPassAuthCheck <archivebox.api.auth.UserPassAuthCheck>`
  - ```{autodoc2-docstring} archivebox.api.auth.UserPassAuthCheck
    :summary:
    ```
* - {py:obj}`HeaderTokenAuth <archivebox.api.auth.HeaderTokenAuth>`
  - ```{autodoc2-docstring} archivebox.api.auth.HeaderTokenAuth
    :summary:
    ```
* - {py:obj}`BearerTokenAuth <archivebox.api.auth.BearerTokenAuth>`
  - ```{autodoc2-docstring} archivebox.api.auth.BearerTokenAuth
    :summary:
    ```
* - {py:obj}`QueryParamTokenAuth <archivebox.api.auth.QueryParamTokenAuth>`
  - ```{autodoc2-docstring} archivebox.api.auth.QueryParamTokenAuth
    :summary:
    ```
* - {py:obj}`UsernameAndPasswordAuth <archivebox.api.auth.UsernameAndPasswordAuth>`
  - ```{autodoc2-docstring} archivebox.api.auth.UsernameAndPasswordAuth
    :summary:
    ```

Functions

:class: autosummary longtable
:align: left

* - {py:obj}`get_or_create_api_token <archivebox.api.auth.get_or_create_api_token>`
  - ```{autodoc2-docstring} archivebox.api.auth.get_or_create_api_token
    :summary:
    ```
* - {py:obj}`auth_using_token <archivebox.api.auth.auth_using_token>`
  - ```{autodoc2-docstring} archivebox.api.auth.auth_using_token
    :summary:
    ```
* - {py:obj}`auth_using_password <archivebox.api.auth.auth_using_password>`
  - ```{autodoc2-docstring} archivebox.api.auth.auth_using_password
    :summary:
    ```

Data

:class: autosummary longtable
:align: left

* - {py:obj}`API_AUTH_METHODS <archivebox.api.auth.API_AUTH_METHODS>`
  - ```{autodoc2-docstring} archivebox.api.auth.API_AUTH_METHODS
    :summary:
    ```

API

:canonical: archivebox.api.auth.get_or_create_api_token

```{autodoc2-docstring} archivebox.api.auth.get_or_create_api_token
```
:canonical: archivebox.api.auth.auth_using_token

```{autodoc2-docstring} archivebox.api.auth.auth_using_token
```
:canonical: archivebox.api.auth.auth_using_password

```{autodoc2-docstring} archivebox.api.auth.auth_using_password
```
:canonical: archivebox.api.auth.APITokenAuthCheck

```{autodoc2-docstring} archivebox.api.auth.APITokenAuthCheck
```

````{py:method} authenticate(request: django.http.HttpRequest, key: typing.Optional[str] = None) -> typing.Optional[django.contrib.auth.models.AbstractBaseUser]
:canonical: archivebox.api.auth.APITokenAuthCheck.authenticate

```{autodoc2-docstring} archivebox.api.auth.APITokenAuthCheck.authenticate
```

````

:canonical: archivebox.api.auth.UserPassAuthCheck

```{autodoc2-docstring} archivebox.api.auth.UserPassAuthCheck
```

````{py:method} authenticate(request: django.http.HttpRequest, username: typing.Optional[str] = None, password: typing.Optional[str] = None) -> typing.Optional[django.contrib.auth.models.AbstractBaseUser]
:canonical: archivebox.api.auth.UserPassAuthCheck.authenticate

```{autodoc2-docstring} archivebox.api.auth.UserPassAuthCheck.authenticate
```

````

:canonical: archivebox.api.auth.HeaderTokenAuth

Bases: {py:obj}`archivebox.api.auth.APITokenAuthCheck`, {py:obj}`ninja.security.APIKeyHeader`

```{autodoc2-docstring} archivebox.api.auth.HeaderTokenAuth
```

```{rubric} Initialization
```

```{autodoc2-docstring} archivebox.api.auth.HeaderTokenAuth.__init__
```

````{py:attribute} param_name
:canonical: archivebox.api.auth.HeaderTokenAuth.param_name
:value: >
   'X-ArchiveBox-API-Key'

```{autodoc2-docstring} archivebox.api.auth.HeaderTokenAuth.param_name
```

````

:canonical: archivebox.api.auth.BearerTokenAuth

Bases: {py:obj}`archivebox.api.auth.APITokenAuthCheck`, {py:obj}`ninja.security.HttpBearer`

```{autodoc2-docstring} archivebox.api.auth.BearerTokenAuth
```

```{rubric} Initialization
```

```{autodoc2-docstring} archivebox.api.auth.BearerTokenAuth.__init__
```

:canonical: archivebox.api.auth.QueryParamTokenAuth

Bases: {py:obj}`archivebox.api.auth.APITokenAuthCheck`, {py:obj}`ninja.security.APIKeyQuery`

```{autodoc2-docstring} archivebox.api.auth.QueryParamTokenAuth
```

```{rubric} Initialization
```

```{autodoc2-docstring} archivebox.api.auth.QueryParamTokenAuth.__init__
```

````{py:attribute} param_name
:canonical: archivebox.api.auth.QueryParamTokenAuth.param_name
:value: >
   'api_key'

```{autodoc2-docstring} archivebox.api.auth.QueryParamTokenAuth.param_name
```

````

:canonical: archivebox.api.auth.UsernameAndPasswordAuth

Bases: {py:obj}`archivebox.api.auth.UserPassAuthCheck`, {py:obj}`ninja.security.HttpBasicAuth`

```{autodoc2-docstring} archivebox.api.auth.UsernameAndPasswordAuth
```

```{rubric} Initialization
```

```{autodoc2-docstring} archivebox.api.auth.UsernameAndPasswordAuth.__init__
```

:canonical: archivebox.api.auth.API_AUTH_METHODS
:value: >
   None

```{autodoc2-docstring} archivebox.api.auth.API_AUTH_METHODS
```

Clone this wiki locally