-
Is there a way to restrict a client to a limited set of users? Assuming I have a client models similar to this: class AdminClient(ClientMixin):
client_id = 'admin'
users = [1, 2, 3]
scope = 'admin'
... # etc. Is it possible to deny an "authorization" requests by this 'admin' client if the logged in user id is not in the list of users (e.g. respond with a 403 or redirect with an error)? I'm basically trying to prevent non-priviliged users from ever getting a token with the scope 'admin', so my initial thought was to user a special Client for this. I also want to be able to know that this user is not able to use this specific client in my frontend application, so I can display a message that this user is not allowed to use this application. However, after looking at the Are there any other hooks I can use to achieve this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I ended up implementing this myself in the authorize view: psuedo code:
|
Beta Was this translation helpful? Give feedback.
I ended up implementing this myself in the authorize view:
psuedo code: