syncMyMoodle icon indicating copy to clipboard operation
syncMyMoodle copied to clipboard

Use wstoken instead of SSO password

Open septatrix opened this issue 3 years ago • 6 comments

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 avatar Jul 01 '21 16:07 septatrix

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 avatar Jul 17 '21 20:07 septatrix

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

septatrix avatar Oct 07 '21 19:10 septatrix

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.

n0toose avatar Oct 24 '22 12:10 n0toose

The tokens themselves are simply hex strings

septatrix avatar Oct 24 '22 12:10 septatrix

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

n0toose avatar Oct 24 '22 12:10 n0toose

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)

septatrix avatar Oct 24 '22 13:10 septatrix