ESPRI-Mod / synda

ESGF Downloader (this is a deprecated repository, the tool has now moved to https://github.com/ESGF/esgf-download)
https://espri-mod.github.io/synda/
21 stars 11 forks source link

add support for username in credentials.conf #200

Open alaniwi opened 2 years ago

alaniwi commented 2 years ago

Currently synda assumes that the username can be extracted from the OpenID:

https://github.com/Prodiguer/synda/blob/80554e2393de92b642d0b0385a3cfb055a736678/synda/sdt/sdlogon.py#L94

and the credentials.conf has support for openid and password but not username

https://github.com/Prodiguer/synda/blob/80554e2393de92b642d0b0385a3cfb055a736678/synda/source/config/file/user/credentials/models.py#L28-L34

It would be good to add support for an (optional) username in the credentials.conf file, so that if it is supplied, then this is used instead of anything extracted from the openid. This will allow for example the use of openids from CEDA, which do not contain the username that is required for login when fetching a certificate (they are of the form https://ceda.ac.uk/openid/Firstname.Lastname).

Thanks.