We've added an 'IP' field into the application model, and our objective is to verify if the client's IP matches the one stored in the application model. To facilitate this, we've inherited from the 'BaseTokenView.' However, we're encountering an issue because we don't have direct access to the application object. The 'client_id' and 'client_secret' are encoded, complicating matters.
We're aware of the 'OAuth2Validator._authenticate_basic_auth' method, which sets the 'request.client' (application object), but we need to access the application object within our view.
To resolve this, we require a new structure that allows us to obtain the client object within the Token API view.
Describe the solution you'd like
Add a method to BaseTokenView that gives us the app object before creating the token.
Is your feature request related to a problem?
We've added an 'IP' field into the application model, and our objective is to verify if the client's IP matches the one stored in the application model. To facilitate this, we've inherited from the 'BaseTokenView.' However, we're encountering an issue because we don't have direct access to the application object. The 'client_id' and 'client_secret' are encoded, complicating matters.
We're aware of the 'OAuth2Validator._authenticate_basic_auth' method, which sets the 'request.client' (application object), but we need to access the application object within our view.
To resolve this, we require a new structure that allows us to obtain the client object within the Token API view.
Describe the solution you'd like Add a method to BaseTokenView that gives us the app object before creating the token.