Disable certain functionalities in RemoteOAuth2Mixin
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Refactoring
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- api, authentication, security
Direzione di ricerca
Inizia leggendo RemoteOAuth2Mixin e DeveloperTokenAuth, quindi esamina la proposta di base comune nell’issue #173. Stabilisci se revoke() e le opzioni del costruttore elencate debbano essere disabilitate o rimosse, e definisci il comportamento previsto per le breaking change nella release 2.0.0.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
When using RemoteOAuth2Mixin, all /token calls are delegated to another process or server. Thus:
- The
client_idandclient_secretshouldn't be required. In fact, they perhaps shouldn't even be allowed to be passed. Clients that need to do remote auth should be discouraged from having any of their credentials hard-coded, especially since they aren't even needed. store_tokensshould perhaps be disallowed. Since the tokens are owned by the remote process, it should be in control of where its tokens go. If a client needs to restart, it should get its tokens from the remote process/server, not from its own token store.box_device_idandbox_device_nameare useless if we're not making/tokencalls.refresh_tokenshould never be available to the client, so it shouldn't be possible to pass this.
Also, since the remote process/server owns the tokens, we should possibly disable revoke(). If we do that, then:
- We definitely don't need
client_idandclient_secretanymore, since they would never be used. - For the same reason, we also don't need
network_layeranymore. - We might not need
refresh_lockanymore. Presumably, the remote server can handle its own locking, without the clients needing to coordinate.
revoke could be made to pass (DeveloperTokenAuth does this) or raise, and the unneeded constructor arguments can be passed as None to the super-class, so that TypeError is raised if a user tries passing any of them.
Alternatively, factor this into #173, and create a common base-class that doesn't have any of these functionalities.
This would be a breaking change, so consider this for 2.0.0.
- Lingua principale
- Python
- Stelle
- 460
- Fork
- 223
- Merge medio
- 14h 18m
- PR unite (30g)
- 21
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di box/box-python-sdk
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
box/box-python-sdk#196 ·
-
bug enhancement
box/box-python-sdk#1314 · 6 commenti · 5 assegnatari ·
-
enhancement
box/box-python-sdk#1154 · 3 commenti · 5 assegnatari ·
-
Asynchronous IO Support Apertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
box/box-python-sdk#1155 · 1 commento · 4 reazioni ·
-
enhancement
box/box-python-sdk#1157 · 1 commento · 6 assegnatari ·
Tutte le issue di box/box-python-sdk
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
use-agent-os/agent-os#3314 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
BasedHardware/omi#15662 · 1 commento ·
-
documentation help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
AiursoftWeb/AnduinOS-2#19 ·