RequestTokenEndpoint (endpoints/request_token.py)

oauthlib · oauthlib/oauth1/rfc5849/endpoints/request_token.py · python · BSD-3-Clause
auth

Implements the OAuth 1.0 request token endpoint to validate incoming requests and generate secure tokens for authentication flows.

# Source: https://github.com/oauthlib/oauthlib | License: BSD-3-Clause | Copyright The OAuthlib Community
# Provided via justclaw.it.com; keep this notice with the code.
# -*- coding: utf-8 -*-
"""
oauthlib.oauth1.rfc5849.endpoints.request_token
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This module is an implementation of the request token provider logic of
OAuth 1.0 RFC 5849. It validates the correctness of request token requests,
creates and persists tokens as well as create the proper response to be
returned to the client.
"""
import logging

from oauthlib.common import urlencode

from .. import errors
from .base import BaseEndpoint

log = logging.getLogger(__name__)


class RequestTokenEndpoint(BaseEndpoint):

    """An endpoint responsible for providing OAuth 1 request tokens.


... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key