Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and Asif Saif Uddin committed Oct 19, 2021
1 parent d67210e commit 6085a2d
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ Copyright (c) 2013, Massimiliano Pippi, Federico Frenguelli and contributors
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
Expand All @@ -22,5 +22,5 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the FreeBSD Project.
6 changes: 3 additions & 3 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Edit :file:`users/models.py` adding the code below:
.. code-block:: python
from django.contrib.auth.models import AbstractUser
class User(AbstractUser):
pass
Expand Down Expand Up @@ -213,8 +213,8 @@ Create a user::

Username: wiliam
Email address: [email protected]
Password:
Password (again):
Password:
Password (again):
Superuser created successfully.

OAuth2 Authorization Grants
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/tutorial_01.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ the API, subject to approval by its users.

Let's register your application.

You need to be logged in before registration. So, go to http://localhost:8000/admin and log in. After that
You need to be logged in before registration. So, go to http://localhost:8000/admin and log in. After that
point your browser to http://localhost:8000/o/applications/ and add an Application instance.
`Client id` and `Client Secret` are automatically generated; you have to provide the rest of the informations:

Expand Down
14 changes: 7 additions & 7 deletions docs/tutorial/tutorial_04.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Part 4 - Revoking an OAuth2 Token
Part 4 - Revoking an OAuth2 Token
=================================

Scenario
Expand All @@ -11,10 +11,10 @@ Be sure that you've granted a valid token. If you've hooked in `oauth-toolkit` i

`Oauthlib <https://github.com/idan/oauthlib>`_ is compliant with https://tools.ietf.org/html/rfc7009, so as specified, the revocation request requires:

- token: REQUIRED, this is the :term:`Access Token` you want to revoke
- token_type_hint: OPTIONAL, designating either 'access_token' or 'refresh_token'.
- token: REQUIRED, this is the :term:`Access Token` you want to revoke
- token_type_hint: OPTIONAL, designating either 'access_token' or 'refresh_token'.

Note that these revocation-specific parameters are in addition to the authentication parameters already specified by your particular client type.
Note that these revocation-specific parameters are in addition to the authentication parameters already specified by your particular client type.

Setup a Request
---------------
Expand All @@ -26,8 +26,8 @@ Depending on the client type you're using, the token revocation request you may
Content-Type: application/x-www-form-urlencoded
token=XXXX&client_id=XXXX

Where token is :term:`Access Token` specified above, and client_id is the `Client id` obtained in
obtained in :doc:`part 1 <tutorial_01>`. If your application type is `Confidential` , it requires a `Client secret`, you will have to add it as one of the parameters:
Where token is :term:`Access Token` specified above, and client_id is the `Client id` obtained in
obtained in :doc:`part 1 <tutorial_01>`. If your application type is `Confidential` , it requires a `Client secret`, you will have to add it as one of the parameters:

::

Expand All @@ -36,7 +36,7 @@ obtained in :doc:`part 1 <tutorial_01>`. If your application type is `Confidenti
token=XXXX&client_id=XXXX&client_secret=XXXX


The server will respond wih a `200` status code on successful revocation. You can use `curl` to make a revoke request on your server. If you have access to a local installation of your authorization server, you can test revoking a token with a request like that shown below, for a `Confidential` client.
The server will respond wih a `200` status code on successful revocation. You can use `curl` to make a revoke request on your server. If you have access to a local installation of your authorization server, you can test revoking a token with a request like that shown below, for a `Confidential` client.

::

Expand Down
2 changes: 1 addition & 1 deletion docs/views/token.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Every view provides access only to the tokens that have been granted to the user
Granted Token views are listed at the url `authorized_tokens/`.


For each granted token there is a delete view that allows you to delete such token. You can override default templates `authorized-tokens.html` for the list view and `authorized-token-delete.html` for the delete view; they are located inside `templates/oauth2_provider` folder.
For each granted token there is a delete view that allows you to delete such token. You can override default templates `authorized-tokens.html` for the list view and `authorized-token-delete.html` for the delete view; they are located inside `templates/oauth2_provider` folder.


.. automodule:: oauth2_provider.views.token
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h3 class="block-center-heading">{% trans "Your applications" %}</h3>

<a class="btn btn-success" href="{% url "oauth2_provider:register" %}">{% trans "New Application" %}</a>
{% else %}

<p>{% trans "No applications defined" %}. <a href="{% url 'oauth2_provider:register' %}">{% trans "Click here" %}</a> {% trans "if you want to register a new one" %}</p>
{% endif %}
</div>
Expand Down

0 comments on commit 6085a2d

Please sign in to comment.