L
L
lleballex2021-02-06 17:28:09
Django
lleballex, 2021-02-06 17:28:09

What is request.successful_authenticator?

What is request.successful_authenticator? What is this value for and what should it be equal to?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
gimntut, 2021-02-06
@gimntut

The Django rest framework can identify a user in a variety of ways, such as cookies or basic authentication. Most often by token.
Authentication methods are specified in the REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES'] setting.
If one of the methods was able to determine the user, then the user sets request.user, and the authentication class itself is written to request.successful_authenticator, so that you can determine which method worked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question