Bug 53542 - Migrate plugins to new auth method introduced in Kelvin GAU fix
Migrate plugins to new auth method introduced in Kelvin GAU fix
Status: NEW
Product: Components
Classification: Unclassified
Component: ucsschool-apis
unspecified
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS@school maintainers
UCS@school maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-07-02 14:33 CEST by Joerg Baach
Modified: 2021-07-02 14:36 CEST (History)
0 users

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joerg Baach univentionstaff 2021-07-02 14:33:34 CEST
In #53534 the fix for the kelvin GAU was ported to ucsschool-api. These changes need to be reflected in the already existing plugins and documentation. 

This mostly means:

from ucsschool.apis.plugins.auth import oauth2_scheme
=>
from ucsschool.apis.plugins.auth import get_token


and

_token: str = Depends(oauth2_scheme)
=>
_token: str = Depends(get_token)

Overrides in tests must be adapted, too. 

QA tasks: 
- review the plugin code
- review the pytest code
- run the tests
- confirm that the gui works with 'get_token' in place