Romern / syncMyMoodle

Synchronization client for RWTH Moodle
GNU General Public License v3.0
72 stars 18 forks source link

Use wstoken instead of SSO password #63

Open septatrix opened 3 years ago

septatrix commented 3 years ago

This way only access to moodle is granted and can easily be revoked. As the script internally already uses wstoken this should be rather simple. Such a token can be easily obtained from the profile page in moodle or alternatively a subcommand could be added which asks for the SSO login credentials and afterwards saves the token to the config.

septatrix commented 3 years ago

Only drawback is that a token for the opencast service cannot be automatically obtained as the service name is unknown. I will ask the ITC to share that. Alternatively the token can still be viewed manually inside the settings.

septatrix commented 3 years ago

Only drawback is that a token for the opencast service cannot be automatically obtained as the service name is unknown. I will ask the ITC to share that. Alternatively the token can still be viewed manually inside the settings.

The service should now have REST enabled under the name filter_opencast_authentication

n0toose commented 2 years ago

Only drawback is that a token for the opencast service cannot be automatically obtained

Is there some sort of documentation describing how tokens are formed? Asking for myself.

septatrix commented 2 years ago

The tokens themselves are simply hex strings

n0toose commented 2 years ago

Please allow me to rephrase: Where does the service name get involved?

septatrix commented 2 years ago

When requesting the token, see https://github.com/septatrix/pymoodle/blob/1fa057de39ba24861a133c5a5f9a51a7301d7489/moodle/session.py#L111-L118 (and maybe the v2 branch, not sure what its state is regarding this :D)