{% extends "layout.html" %} {% block title %}OAuth 2.0 Example Site{% endblock %} {% block content %}
This example Django site implements OAuth 2.0 clients and servers.
Start by signing up then creating a client. Clients are applications that request authorization from users to access data on their behalf.
{% if request.user.is_authenticated %}The following account data is available to authorized clients at the specified endpoint URI:
Name | Value | Scope | Endpoint URI |
---|---|---|---|
Date Joined | {{ request.user.date_joined }} | date_joined | /api/date_joined |
Last Login | {{ request.user.last_login }} | last_login | /api/last_login |
{{ request.user.email }} | No scope | /api/email |
Authorize the clients at the various scopes:
Name | date_joined | last_login | No scope |
---|---|---|---|
{{ client.name }} |
You have no clients. Create one to demo authorization.
{% endif %} {% if access_tokens %}You have issued the following access tokens. Follow the links to see access your data using their credentials.
Client name | Scope | date_joined | last_login | No scope |
---|---|---|---|---|
{{ access_token.client.name }} | {% if access_token.scope.all|length == 0 %} No scope {% endif %} {% for access_range in access_token.scope.all %} {{ access_range.key }} {% endfor %} | /api/date_joined | /api/last_login | /api/email |
You have no access_tokens. Authorize a client to create one.
{% endif %} {% endif %}